C++ Program for getting grade from Marks with Else If Ladder
#include<iostream>
#include<conio.h>
using namespace std;
int main()
{
// 81-100 A;60-80 B;50-60 C;33-50 D;0-33 F;
int n , m;
cout<<"Enter your Marks :";
cin>>n;
if (n>=80 && n<=100)
{cout<<"A+";}
else if (n>=60 && n<=80)
{cout<<"B";}
else if (n>=50 && n<=60)
{cout<<"C";}
else if (n>=33 && n<=50)
{cout<<"D";}
else if (n>=0 && n<=33)
{cout<<"Better luck next time";}
}
Comments
Post a Comment