Answer:
#include <iostream>
#include <cmath>
#include <math.h>
#include <fstream>
#include <string>
#include <numeric>
using namespace std;
int main()
{
ifstream infile;
float num;
float total;
float x;
float aver;
x=0; total=0;
infile.open("Exercise13_3.txt");
while(!infile.eof())
{
infile>>num;
total=total+num;
x++;
}
aver=(total-num)/(x-1);
cout << "Number of grades = " <<x<< "\n";
cout<< "Total of all grades = " <<total<<'\n';
cout<< "Average grade = "<<aver<<'\n';
cout<< ""<<'\n';
infile.close();
getchar();
return 0;
}