How do I write any number of numbers on command prompt and get their average or sort after pressing enter