Make full mark sheet Program Code in C++ using turbo c editor.(Use appropriate data member and member function)
#include<stdio.h> ___(Don't Missing Syntax required).
#include<conio.h> ___(Don't Missing Syntax required).
#include<iostream.h> ___(Don't Missing Syntax required).
class student
{
int
no,s1,s2,s3,tot,per;
char
*name;
char div;
public:
student(int
num,char *nm,char d,int n1,int n2,int n3) ___(Don't Missing Syntax required).
{
no=num;
name=nm;
div=d;
s1=n1;
s2=n2;
s3=n3;
tot=s1+s2+s3;
per=tot/3;
}
void
total()
{
cout<<"\n-----------------Marksheet---------------"<<endl; ___(Don't Missing Syntax required).
cout<<"\n
Student No :"<<no<<endl;
cout<<"\n
Student Name :"<<name<<endl;
cout<<"\n
Division :"<<div<<endl;
cout<<"\n
Subject1 Mark :"<<s1<<endl;
cout<<"\n
Subject2 Mark :"<<s2<<endl;
cout<<"\n
Subject3 Mark :"<<s3<<endl;
cout<<"\n
Total :"<<tot<<endl;
cout<<"\n
Percentage :"<<per<<endl;
}
void
grade() ___(Don't Missing Syntax required).
{
if(per>=70)
{
cout<<"\n
Grade : Distiction"<<endl; ___(Don't Missing Syntax required).
}
else
if(per>=60)
{
cout<<"\n
Grade : First"<<endl; ___(Don't Missing Syntax required).
}
else
if(per>=48)
{
cout<<"\n
Grade : Second"<<endl; ___(Don't Missing Syntax required).
}
else
if(per>=40)
{
cout<<"\n
Grade : Pass"<<endl;
}
else
{
cout<<"\n
Grade : Fail"<<endl; ___(Don't Missing Syntax required).
}
cout<<"\n....................................."<<endl; ___(Don't Missing Syntax required).
}
};
void main()
{
int
no,n1,n2,n3;
char *nam;
char divi;
clrscr();
cout<<"\n
Enter Student No.: "; ___(Don't Missing Syntax required).
cin>>no;
cout<<"\n
Enter Student Name :"; ___(Don't Missing Syntax required).
cin>>nam;
cout<<"\n
Enter Your Division :"; ___(Don't Missing Syntax required).
cin>>divi;
cout<<"\n
Enter Subject1 Mark :"; ___(Don't Missing Syntax required).
cin>>n1;
cout<<"\n
Enter Subject2 Mark :"; ___(Don't Missing Syntax required).
cin>>n2;
cout<<"\n
Enter Subject3 Mark :"; ___(Don't Missing Syntax required).
cin>>n3;
student
s(no,nam,divi,n1,n2,n3);
s.total();
s.grade();
getch();
}
Note: *Remove The Sentence on this program ___(Don't Missing Syntax required).
Note: *Remove The Sentence on this program ___(Don't Missing Syntax required).
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment