Rita is writing a c++ program in which she want to display the grades (stored in variable grade) as per the table of marks (store in variable marks) given below:<br />A- 90-100<br />B- 80-89<br />C- 70-79<br />D- <70<br />write the code using appropriate C++ conditional statement so as to help Rita complete how work after accepting marks.
Answers
Answered by
4
#include
#include
Voidmain()
Clrscr();
{
Int a,marks;
Cout<<"enter the marks of 10 students out of 100 ";
For(int i = 1 ;i<= 10 ; i++)
Cin》i;
Marks=i
If (marks >90)
Cout 《" grade is "《"A";
Else If (marks >80)
Cout《"grade is B";
Elese if (marks > 60)
Cout《"grade is c";
Else if(marks > 40)
Cout《"grade is D";
Else ;
Cout 《 " FAIL";
Getch();
}
#include
Voidmain()
Clrscr();
{
Int a,marks;
Cout<<"enter the marks of 10 students out of 100 ";
For(int i = 1 ;i<= 10 ; i++)
Cin》i;
Marks=i
If (marks >90)
Cout 《" grade is "《"A";
Else If (marks >80)
Cout《"grade is B";
Elese if (marks > 60)
Cout《"grade is c";
Else if(marks > 40)
Cout《"grade is D";
Else ;
Cout 《 " FAIL";
Getch();
}
MRaipur:
thx for helping me ...
Similar questions