#include<iostream.h>
#include<conio.h>
struct dob
{
int d,m,y;
};
struct student
{
char name[10];
int age;
dob date;
};
void main()
{
clrscr();
student s;
cout<<"\n";
cout<<"enter name,age and date";
cout<<"\n\n";
cout<<"Name - ";
cin>>s.name;
cout<<"\n";
cout<<"age - ";
cin>>s.age;
cout<<"\n";
cout<<"Date - ";
cin>>s.date.d;
cin>>s.date.m;
cin>>s.date.y;
cout<<"\n\n";
cout<<"Details are";
cout<<"\n\n";
cout<<"name - "<<s.name;
cout<<"\n\n";
cout<<"age - "<<s.age;
cout<<"\n\nDate - "<<s.date.d<<"-"<<s.date.m<<"-"<<s.date.y;
getch();
}
#include<conio.h>
struct dob
{
int d,m,y;
};
struct student
{
char name[10];
int age;
dob date;
};
void main()
{
clrscr();
student s;
cout<<"\n";
cout<<"enter name,age and date";
cout<<"\n\n";
cout<<"Name - ";
cin>>s.name;
cout<<"\n";
cout<<"age - ";
cin>>s.age;
cout<<"\n";
cout<<"Date - ";
cin>>s.date.d;
cin>>s.date.m;
cin>>s.date.y;
cout<<"\n\n";
cout<<"Details are";
cout<<"\n\n";
cout<<"name - "<<s.name;
cout<<"\n\n";
cout<<"age - "<<s.age;
cout<<"\n\nDate - "<<s.date.d<<"-"<<s.date.m<<"-"<<s.date.y;
getch();
}