11. #include<stdio.h>
#include<conio.h>
union marks
{ int phy;
int che;
int mat;
int total;
float per;
}s1;
void main()
{
clrscr();
cout<<“Enter Marks detailsn”;
cout<<"Enter physics marksn”;
cin>>s1.phy;
cout<<"Enter chemistry marksn”;
cin>>s1.che;
cout<<"Enter Math Marksn”;
cin>>s1.mat;
s1.total=s1.phy+s1.che+s1.mat;
cout<<"Total Marks = “<<s1.total <<“n”;
s1.per=s1.total*1/3;
cout<<"Percentage = ”<<s1.pern”;
getch();
}
EXTRA