Programm on April 4, 2017
#include<iostream.h>
#include<conio.h>
#include<stdlib.h>
#include<string.h>
struct FA
{
int fmark;
};
struct Subject
{
char subj[20];
struct FA fa[4];
};
struct Students
{
char name[20];
int class1;
struct Subject sub[5];
};
void main()
{
clrscr();
struct Students std[5];
cout<<"\n-----------------------------------------\n";
for(int i=0; i<1; i++)
{
cin>>std[i].name;
for(int j=0;j<5; j++)
{
cout<<"\nEnter Subject: "<<j+1;
cin>>std[i].sub[j].subj;
for(int p=0; p<4; p++)
{
cout<<"\nEnter FA-"<<p+1;
cin>>std[i].sub[j].fa[p].fmark;
}
}
}
cout<<"\n-----------------------------------------------------\n";
for( i=0; i<1; i++)
{
cout<<std[i].name;
for(int j=0;j<5; j++)
{
cout<<"\nSubject: "<<std[i].sub[j].subj;
cout<<"\n---------FAS-----------\n";
for(int p=0; p<4; p++)
{
cout<<"\t: FA-"<<p+1<<" :"<<std[i].sub[j].fa[p].fmark;
}
}
}
getch();
}
#include<iostream.h>
#include<conio.h>
#include<stdlib.h>
#include<string.h>
struct FA
{
int fmark;
};
struct Subject
{
char subj[20];
struct FA fa[4];
};
struct Students
{
char name[20];
int class1;
struct Subject sub[5];
};
void main()
{
clrscr();
struct Students std[5];
cout<<"\n-----------------------------------------\n";
for(int i=0; i<1; i++)
{
cin>>std[i].name;
for(int j=0;j<5; j++)
{
cout<<"\nEnter Subject: "<<j+1;
cin>>std[i].sub[j].subj;
for(int p=0; p<4; p++)
{
cout<<"\nEnter FA-"<<p+1;
cin>>std[i].sub[j].fa[p].fmark;
}
}
}
cout<<"\n-----------------------------------------------------\n";
for( i=0; i<1; i++)
{
cout<<std[i].name;
for(int j=0;j<5; j++)
{
cout<<"\nSubject: "<<std[i].sub[j].subj;
cout<<"\n---------FAS-----------\n";
for(int p=0; p<4; p++)
{
cout<<"\t: FA-"<<p+1<<" :"<<std[i].sub[j].fa[p].fmark;
}
}
}
getch();
}
Comments
Post a Comment