Computer Science, asked by runiyal246, 1 year ago

Rita is writing a C++/programe in whic, she wants to display thr grades ( stored in variable grade) as per the table of marks (stored in variable marks) given below:
A - 90-100
B - 80-89
C - 70-79
D < 70

Write the code using appropriate C++ conditional statement so as to help Rita complete her work after accepting marks.

Answers

Answered by uneq95
2
#include<iostream>
using namespace std;
int main(){
int marks;
cout<<"please enter your marks ";
cin>>marks;
if(marks>=90&&marks<=100)
cout<<"A";
else if(marks>=80&&marks<=89)
cout<<"B";
else if(marks>=70&&marks<=79)
cout<<"C"
else
cout<<"D";

return 0;
}

You can modify the print statements as you want them to be.

runiyal246: Arey meko kuch ni aata bhyii..
uneq95: then dont..thus will work..
runiyal246: Tq ji tq..
Similar questions