#include<iostream>
using namespace std;
void main()
{
float math;
float physics;
float english;
float chemistry;
float biology;
float total = 500;
cout << "enter your marks" << endl;
cout << "math=";
cin >> math;
cout << "physics=";
cin >> physics;
cout << "english=";
cin >> english;
cout << "chemistry=";
cin >> chemistry;
cout << "biology=";
cin >> biology;
cout << "total marks=" << math + physics + english + chemistry + biology << endl;
cout<<"persentage="<<( math + physics + english + chemistry + biology)*100/total<<endl;
int y = (math + physics + english + chemistry + biology) * 100 / total;
if (y >= 80 )
{
cout << "grade a";
}
if (y>=60 && y<80)
{
cout << "grade b";
}
if (y>=40 && y < 60)
{
cout << "grade c";
}
if (y < 40)
{
cout << "fail";
}
}


0 Comments