I have a couple of problems, so I thought I'd concentrate them into 1 post:
I have a text file with a list of numbers like this:
I need to write a program which reads this file, then prints the smallest number, largest number and the mean. I can write the part which reads the file and the part which calculates the mean, but I have no idea how to tell it to work out the smallest and largest number...
I have another text file with several lines of information which look like this:
a b c d e f g
h i j k l m n
where each letter in this case is either a word or a number, separated by tabs. The program needs to prompt the user to enter a line number, and then the program will extract the data from that line, and print it in a readable way. I don't know how to do this, so I was wondering if someone could either tell me how, or at least point me in the right direction with a function which can scan certain lines...
Thanks very much in advance for the aid.