C++ Program Result card Sum,Percentage,Grade
#include<iostream>#include<conio.h>
using namespace std;
int main()
{
int sum,eng,math,bio,grade,percentage;
cout<<"Enter The marks of Eng:";
cin>>eng;
cout<<"Enter the marks of Math:";
cin>>math;
cout<<"Enter the marks of bio:";
cin>>bio;
sum=eng+math+bio;
cout<<sum;
percentage=(sum*100)/300;
cout<<endl<<percentage;
cout<<endl<<"Grade:";
if(percentage>=80)
{
cout<<"A";
}
else if(percentage>=70)
{
cout<<"B+";
}
else if(percentage>=60)
{
cout<<"B";
}
else if(percentage>=50)
{
cout<<"C";
}
else
{
cout<<"You are Failed";
}
cout<<endl<<"Thanks";
}
OUTPUT:-
Enter The marks of Eng:77
Enter the marks of Math:77
Enter the marks of bio:66
220
73
Grade:B+
Thanks
No comments:
Post a Comment
Thanks for comment