Answer to Question #313045 in C++ for Mac

Question #313045

Question:


Develop a solution, that will accept 10 students details such Student Name, ID No. and Marks of three subjects (All marks entered by the user must be within the range of 0 -100). Calculate the average marks for the student and the average marks will determine the final grade of the student. The assessment will be as follow:


70 –100          : A

60 –69            : B

50 –59            : C

40 – 49           : D

0 –39              : F



  1. Student is required to use the following tools to solve each of the questions as above.

(a)  Develop PAC                                                                         

(b) Develop IPO                                                                          

(c)  Develop a Data Dictionary

(d) Develop Flowchart                            

(e)  Develop an algorithm 


1
Expert's answer
2022-03-17T08:55:46-0400

Here is program:

int main()
{
	const int size = 3;
	int grade;
	string name;
	int id;
	string arr[size];
	for (int j = 0; j < 10; j++)
	{
		cout << "Enter name student:" << endl;
		cin >> name;
		id++;
		for (int i = 0; i < size; i++)
		{
			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