/*C++ program to print the students marks*/

#include<iostream.h>
#include<conio.h>
void main()
{
int sno,m1,m2,m3,tot;
float avg;
clrscr();
cout<<“enter sno,m1,m2,m3:”;
cin>>sno>>m1>>m2>>m3;
tot=m1+m2+m3;
avg=tot/3;
cout<<“\n sno=”<<sno;
cout<<“\n m1=”<<m1;
cout<<“\n m2=”<<m2;
cout<<“\n m3=”<<m3;
cout<<“\n tot=”<<tot;
cout<<“\n avg=”<<avg;
if(avg>=90)
{
cout<<“\n distinction”;
}
else if(avg>=60)
{
cout<<“\n first class”;
}
else if(avg>=50)
{
cout<<“\n second class”;
}
else if(avg>=40)
{
cout<<“\n third class”;
}
else if(avg>=35)
{
cout<<“\n pass”;
}
else
{
cout<<“FAIL”;
}
getch();
}

75,018 total views, 44 views today

Get Free Email Updates..!
Join us for FREE to get instant email updates..! GobsInfo- Everything Unlimited
We hate spam. Your email address will not be sold or shared with anyone else.

4,607 Thoughts to “C++ program to print the students marks”

  1. Some truly fantastic content on this website , appreciate it for contribution.

  2. I dugg some of you post as I cogitated they were very beneficial extremely helpful

Leave a Comment