Average of 2 Exams and Letter Grade for 3 Students

I am trying to get the average for 2 exams that will give me a letter grade for 3 students.

#include<iostream>
#include<iomanip>
#include<cmath>
#include<string>

using namespace std;

int main()

{
//Declare Identifiers

char Name;
int Exam1, Exam2,NoStudents;
float Score,Average;

if (Score >= 90)
cout << "A" << endl;
else if (Score >= 80)
cout << "B" << endl;
else if (Score >= 70)
cout << "C" << endl;
else if (Score >= 60)
cout << "D" << endl;
else if (Score >= 50)
cout << "F" << endl;

//Display
cout << setfill('-') << right << setw(15) << "Consulting Center" << right << setw(10) << "-" << endl;
cout << "Let's see how you are doing in your classes.\n";
cout << "Please enter the number of students: "; cin >> NoStudents;
cout << "\tWhat's your name? "; cin >> Name;
cout << Name << ", please enter you scores in two exams: "; cin >> Exam1 >> Exam2;
(Exam1 + Exam2) / 2 = Score;
cout << "\t\t " << Name << ", with an average of " <<(Exam1+Exam2)/2 << "your grade is" << Score<< endl;



//Terminate Program
system("pause");
return 0;
}
Topic archived. No new replies allowed.