Infolinks - Earn Easy Money

Saturday, April 4, 2015

C++ Program to find the grade of numbers obtained

#include <iostream>
using namespace std;
int main ( )
{
int marks;
cout <<" Enter the marks you gained \n";
cin >> marks;
if ( marks >= 0 && marks <50 )
{
cout <<" Mubarik ho bhai! Aap ko supply say nawaza gia hay ";
}
else if ( marks >= 50 && marks < 60 )
{
cout <<" You got D grade marks " ;
}
else if ( marks >= 60 && marks < 70 )
{
cout <<" You got c grade marks ";
}
else if ( marks >= 70 && marks < 80 )
{
cout <<" You got B grade marks ";
}
else if ( marks >= 80 && marks < 90 )
{
cout <<" You got a grade marks ";
}
else if ( marks >= 90 && marks < 100 )
{
cout <<" Wah g wah bchay ka A+ grade aya hay ";
}
return 0;
}

No comments:

Post a Comment

Must drop your comments about post.