Morteza Kashi

An statistical program showing how to read from a file and write to a file in C++ programming.

This program teaches you how to get data from an input file and how to write data to an out put file in C++

programming.

There should be an input file on your C drive named "input.txt". This file contains an integer in each line of that.

The program goes through this file and its integers and writes out the following statistical information in the file

named "output.txt" on your C drive:

The total number of positive numbers read in
The total number of negative numbers read in
The smallest number read in
The largest number read in
The average of negative numbers
The average of positive numbers
The average of all numbers

You can find the "input.txt" file by clicking on the following:

input.txt

Please find my C++ code for this program by clicking on the following link:

Statistics.cpp

Please click on the following link, should you want to see the execution of the program. To do that,  Save the file "Credit.exe" on your desktop or somewhere else on your computer. Then, double click on it to see the execution of the program.

Statistics.exe

Please contact me by clicking HERE and  filling out the coming simple form, should you have any question

about this program.

3D animated signs