Comparison of Microsoft Cuzz and Jinx Concurrency Debugging tool
View post:
Comparison of Microsoft Cuzz and Jinx Concurrency Debugging tool
30
View post:
Comparison of Microsoft Cuzz and Jinx Concurrency Debugging tool
i need help Developing a C++ program to:
1.read a series of integer numbers from the file “proj7.txt”
2.calculate and display the total of these numbers
3.calculate and display the average of these numbers
what i have so far is number 1 but i need help completing 2-3
#include<iostream>
#include<fstream>
#include<ctime>
using namespace std;
int main()
{
int total;
const int text=81;
char input[text];
fstream dataFile;
dataFile.open("proj7.txt",ios::in );
if (!dataFile)
{
cout<<"Error"<<endl;
return 0;
}
dataFile.getline(input,text,’$');
while(!dataFile.eof())
{
cout<<input<<endl;
dataFile.getline(input,text,’$');
}
cout<<total<<endl;
dataFile.close();
return 0;
}
Read more here:
help please because it due by wed