78 452
Assignments Done
Successfully Done
In September 2019

Answer to Question #15909 in C++ for buckly brian

Question #15909
Your Mathematic school teacher want to use a program that can read the name and the mark of a student. Your teacher want the program to automatically find the grade of the mark and display the result(name, mark and grade). Help your teacher to develop a program that can solve his problem. The grading is as follow 80 – 100 A 60 – 79 B 40 – 59 C 0 – 39 D
Expert's answer

char name[50], grade;
int mark;

void main(){
cout<<"Enter the name of a student: ";
cout<<"Enter the mark of a student: ";
grade = 'A';
if (mark<80) grade = 'B';
if (mark<60) grade = 'C';
if (mark<40) grade = 'D';
cout<<"Student: "<<name<<"\nMark: "<<mark<<"\nGrade: "<<grade<<"\n";

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!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions