#include <iostream>
using namespace std;
int main() {
int grade;
char mark;
cout << "Enter a grade: ";
cin >> grade;
if (grade >= 90) {
mark = 'A';
}
else if (grade >= 80) {
mark = 'B';
}
else if (grade >= 70) {
mark = 'C';
}
else if (grade >= 60) {
mark ='D';
}
else {
mark = 'F';
}
cout << "Your mark is " << mark << endl;
return 0;
}
Comments
Leave a comment