#include <iostream>
using namespace std;
int main() {
int rollno;
char name[30];
int m1,m2,m3,m4,m5,total,avg;
cout <<"\t\t student mark list"<<endl;
cout <<"****INPUT****"<<endl;
cout<<"Enter the name"<<endl;
cin>>name;
cout<<"Enter the roll no"<<endl;
cin>>rollno;
cout <<"Enter the marks "<<endl;
cin>>m1>>m2>>m3>>m4>>m5;
total=m1+m2+m3+m4+m5;
avg=total/5;
cout <<"*******OUTPUT*******"<<endl;
cout <<"NAME : "<<name<<endl;
cout <<"ROLL NO : "<<rollno<<endl;
cout<<"MARKS :"<<m1<<"\t"<<m2<<"\t"<<m3<<"\t"<<m4<<"\t"<<m5<<endl;
cout<<"TOTAL="<<total<<endl;
cout<<"AVERAGE="<<avg<<endl;
if (avg<=100&&avg>90)
cout <<"A Grade";
else if (avg<=90&&avg>80)
cout <<"B Grade";
else if (avg<=80&&avg>70)
cout <<"C Grade";
else if (avg<=70&&avg>60)
cout <<"D Grade";
else if (avg<=60&&avg>50)
cout <<"E Grade";
else
cout <<"FAIL";
return 0;
}
To embed this program on your website, copy the following code and paste it into your website's HTML: