I just have one mistake in my code and I cant figure it out?

jayteemoney

New member
this is the message I get:

1>c:\users\jason s. thomas\desktop\c++ projects\j.thomas_lab1\j.thomas_lab1\lab1_class_roster.cpp(89): fatal error C1075: end of file found before the left brace '{' at 'c:\users\jason s. thomas\desktop\c++ projects\j.thomas_lab1\j.thomas_lab1\lab1_class_roster.cpp(7)' was matched

This is my Code:

// it says the error is in the first line <iostream> how is that possible????

#include <iostream>
#include <string>

using namespace std;

int main()
{
//step 1: Declare variables
string firstname = " ";
float avg=0, grade1=0, grade2=0, grade3=0;
char finalGrade = 'F';
int studentCount=0;
char grade;
char A, B, C, D, F;
float total;

//step 2: Design the loop to process students
for(int studentCount=1; studentCount<=25; studentCount=studentCount+1)
{

//step 3a: Get the input
cout<<"Please enter Students first name"<<endl;
cin>> firstname ;
cout<<"Please Enter Grade #1"<<endl;
cin >> grade1 ;
cout<<"Please Enter Grade #2"<<endl;
cin >> grade2 ;
cout<<"Please Enter Grade #3"<<endl;
cin>> grade3 ;
{
//step 3b: Calculate the average
avg = grade1+grade2+grade3;
total = avg;

if (total/3<=59.99)
{
cout<<"you have a failing Grade"<<endl;
}
else if (total/3>=60 && total<=69.99)
{
cout<<"You Have a D Average"<<endl;
}
else if (total/3>=70 && total<=79.99)
{
cout<<"You Have a C Average"<<endl;
}
else if (total/3>=80 && total<=89.99)
{
cout<< "You Have a B Average"<<endl;
}
else if (total/3>=90 && total<=100)
{
cout<<"You Have an A Average"<<endl;
}
cout<<"Your Overall GPA. is: "<<total/3<<"average"<<endl;
{





}
//step 3d: Write the output
system("pause");
}

return 0;
}

Oh yeah I cant get my letter grade to print but the Average does perfectly
please help
Thank you guys!!!
 
Back
Top