//program to tell grade to user..
#include<iostream.h>
using namespace std;
void main()
{
int marks=0;
cout<<"plz enter your marks";
cin>>marks;
if(marks>=0&&marks<=100)
{if(marks<=49)
{
cout<<"grade f";
}
if(marks>=50&&marks<=60)
{
cout<<"your grade is C";
}
if(marks>60&&marks<=70)
{
cout<<"grase b";
}
if(marks>70&&marks<80)
{
cout<<"grade B+";
}
if(marks>80&&marks<=90)
{
cout<<"grade A";
}
if(marks>90&&marks<=100)
{
cout<<"grade A+";
}
}
else
{
cout<<"ohhhhhhhhhhhhhhhhhh.... .!!!!!! \n you enterd invalid marks" ;
}
system("pause");
}
#include<iostream.h>
using namespace std;
void main()
{
int marks=0;
cout<<"plz enter your marks";
cin>>marks;
if(marks>=0&&marks<=100)
{if(marks<=49)
{
cout<<"grade f";
}
if(marks>=50&&marks<=60)
{
cout<<"your grade is C";
}
if(marks>60&&marks<=70)
{
cout<<"grase b";
}
if(marks>70&&marks<80)
{
cout<<"grade B+";
}
if(marks>80&&marks<=90)
{
cout<<"grade A";
}
if(marks>90&&marks<=100)
{
cout<<"grade A+";
}
}
else
{
cout<<"ohhhhhhhhhhhhhhhhhh....
}
system("pause");
}
No comments:
Post a Comment