#include<iostream.h>
#include<conio.h>
struct stud
{
char stdname[20] ;
int reg,m1,m2,m3;
int tot()
{
int t=m1+m2+m3;
return(t);
}
}data;
void main()
{
clrscr();
cout<<"\n\tEnter Student Name:";
cin>>data.stdname;
cout<<"\n\tEnter Student Register No:";
cin>>data.reg;
cout<<"\n\tEnter First Mark:";
cin>>data.m1;
cout<<"\n\tEnter Second Mark:";
cin>>data.m2;
cout<<"\n\tEnter Third Mark:";
cin>>data.m3;
cout<<"\n\t Student Name:"<<data.stdname;
cout<<"\n\t Student Register No:"<<data.reg;
cout<<"\n\t First Mark:"<<data.m1;
cout<<"\n\t Second Mark:"<<data.m2;
cout<<"\n\t Third Mark:"<<data.m3;
cout<<"\n Total:"<<data.tot();
float per=data.tot()
cout<<"\tPersentage:"<<per/300*100;
getch();
}
No comments:
Post a Comment