![]() |
Help with a C++ code! It's just not working properly!!
Hi, i have to write a program that will search a file of numbers of type double and write the largest and the smallest numbers to the screen. The program should also output the average of the numbers in the file to the screen. The file contains nothing but numbers of type int separated by blanks or line breaks.
This is my code! I created a file containing only 7 numbers from 1-7. When I run the program the 7 shows as the highest number but 3 shows as the lowest number??? and the average as -9.3!!!! I can't figure what's wrong with it! can someone please help me? Code:
#include <fstream> |
Re: Help with a C++ code! It's just not working properly!!
Moved to C-C++ forum
|
| All times are GMT +5.5. The time now is 07:55. |