I'm taking a computer science class, but I do not have a very good professor. He does not explain anything.
We have an assignment to :
Write a complete C++ program in stats.cc to read an arbitrary number of real numbers(one value per input record) from a specified input file and write to a specified output file each of the values as they are read in and print with appropriate labels the following summary output (after all values have been individually read and processed):
1. the number of strictly positive values read (those greater than zero)
2. the number of strictly negative values read (those less than zero)
3. the total number and arithmetic mean (average) of values read
4. the largest and smallest values read
5. percentages of the number of strictly negative values and strictly positive values read
I'm not looking for anyone to write this for me, but rather to explain exactly what he is asking me for and help me out.
I know I need:
#include <iostream>
#include <fstream>?
#include <cstdlib>?
using namespace std;
int main() {
ifstream infile;
ofstream outfile;