Computer Science, asked by MRaipur, 1 year ago

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:
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 how work after accepting marks.

Answers

Answered by bookworm13
5
// program to accept and display marks. #include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int marks;
cout<<" enter marks";
cin>>marks;
if((marks<=100)&&(marks>=90))
{
cout<<"A";
}
if((marks==89)&&(marks>=80))
{
cout<<"B";
}
if((marks==79)&&(marks=70))
{
cout<<"C";
}
if(marks>70)
{
cout<<"D";
}
getch();
}

this is a simple if program

bookworm13: hope u understood
bookworm13: if u want me to explain feel free to ask
MRaipur: thx u
MRaipur: i have one more question to ask
MRaipur: u can see in my profile
MRaipur: hello
MRaipur: pls help me in my another question
bookworm13: can u send the q again
MRaipur: Can i get u no. ... so i can directly sent the pic of question .. if possible.. because my deadline is monday.. thx
MRaipur: ur*
Similar questions