/*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();
}

31,623 total views, 24 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.

2,146 Thoughts to “C++ program to print the students marks”

  1. Wonderful web site. A lot of useful information here. I
    am sending it to some buddies ans also sharing in delicious.
    And naturally, thank you on your sweat!

Leave a Comment