I have to write a program the reads students grades together with their test grades.  It suppose to compute the average test scores an then assign the appropriate grade. have to use a void function to determine the average for the five test scores and a value returning function to determine and return each students grade. the students grades are on an infile and i have to output it to an outfile. 
This is what i have:
 #include %26lt;iostream%26gt;
#include %26lt;fstream%26gt;
using namespace std;
calculateGrade(float);
int main ()
{
    ifstream infile;
    infile.open("C:\inGrade.dat");
    
    
    
    
    ofstream outfile;
    outfile.open("C:\FinalGrades.txt");
    
    calculateGrade()
   
    
    infile.close ();
    outfile.close ();
    
    
    system("pause");
    return 0;
}
void calculateGrade(string, float)
{
if (average%26gt;=90)
    outfile%26lt;%26lt;"A"%26lt;%26lt;endl;
    else if(average%26gt;=80)
    outfile%26lt;%26lt;"B"%26lt;%26lt;endl;
    else if (average%26gt;=70)
HELP with a C++ program reading students grades from an infile and outputing the results to outfile?
http://computercomponents.spaces.live.co...
Subscribe to:
Post Comments (Atom)
 
No comments:
Post a Comment