Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created July 28, 2021 04:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amankharwal/bd1be62644d2d7a8ff968668ab7e738e to your computer and use it in GitHub Desktop.
Save amankharwal/bd1be62644d2d7a8ff968668ab7e738e to your computer and use it in GitHub Desktop.
#include <iostream>
using namespace std;
int main(){
int marks;
cout<<"Enter Your Marks: ";
cin>>marks;
if (marks >= 90){
cout<<"Your Grade is A+";
}
else if (marks >= 80){
cout<<"Your Grade is A";
}
else if (marks >= 70){
cout<<"Your Grade is B+";
}
else if (marks >= 60){
cout<<"Your Grade is B";
}
else if (marks >= 50){
cout<<"Your Grade is C";
}
else if (marks >= 40){
cout<<"Your Grade is D";
}
else if (marks >= 30){
cout<<"Your Grade is E";
}
else if (marks <= 30){
cout<<"Your Grade is F";
}
else{
cout<<"Enter Valid Marks";
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment