ENTER USER MARKS AND GET RESULT IN GRADE IN CPP PROGRAM
#include<iostream>
using namespace std;
int main(){
int marks;
cout<<"Enter your marks in your subject "<<endl;
cin>>marks;
if(marks>=85)
cout<<"A+"<<endl;
else if(marks>=75)
cout<<"A"<<endl;
else if(marks>=60)
cout<<"B+"<<endl;
else if(marks>=55)
cout<<"B"<<endl;
else if(marks>=40)
cout<<"c"<<endl;
else if(marks>=34)
cout<<"D"<<endl;
else
cout<<"fail"<<endl;
return 0;
}
Comments
Post a Comment