Answer to Question #314884 in C++ for Angie

Question #314884

Write a ‘C++’ program (capable of being compiled on any standard ‘C++’ compiler and

in particular Bloodshed Dev-C++ compiler, the one that we use for our course.

The program will need to calculate the final mark and corresponding grade and letter

grade based on the information given below. 


1
Expert's answer
2022-03-20T14:41:18-0400
int main()
{
	int grade;
			cin >> grade;
			if (grade > 0 && grade < 40)
			{
				arr[i] = "F";
			}
			else if (grade >= 40 && grade < 50)
			{
				arr[i] = "D";
			}
			else if (grade >= 50 && grade < 60)
			{
				arr[i] = "C";
			}
			else if (grade >= 60 && grade < 70)
			{
				arr[i] = "B";
			}
			else if (grade >= 70 && grade < 101)
			{
				arr[i] = "A";
			}
			else
			{
				cout << "Error" << endl;
				break;
			}
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog