arrays

Write a C program to read floating point numbers from a file until the end of file. Assume a maximum of 200. Output the entire array. Replace any number less than the average with zero and output this new array.

Please help..
I think you would do best to open your course's book and read some chapters.
To get you on your way:
1
2
3
4
5
6
7
8
9
#include <fstream>
using namespace std;
int main()
{
    float FloatsFromFile[200];
    ifstream FileToOpen;
    FileToOpen.open("Yourfile")

}
Last edited on
Topic archived. No new replies allowed.