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

121,384 total views, 102 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.

7,916 Thoughts to “C++ program to print the students marks”

  1. Head turns permit the eyes to touch upon a situation.

  2. I have fun with, result in I discovered exactly what I used to be having
    a look for. You have ended my four day lengthy hunt!
    God Bless you man. Have a nice day. Bye

  3. This is a very good tip especially to those fresh to the blogosphere.

    Simple but very precise information… Many thanks for sharing this one.
    A must read post!

Leave a Comment