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

97,279 total views, 18 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.

6,320 Thoughts to “C++ program to print the students marks”

  1. Quality articles or reviews is the secret to attract the people to
    go to see the web site, that’s what this web site is providing.

  2. Having read this I thought it was very enlightening.
    I appreciate you finding the time and energy to put this short article together.
    I once again find myself spending way too much time both reading and leaving comments.
    But so what, it was still worthwhile!

Leave a Comment