-
Notifications
You must be signed in to change notification settings - Fork 0
/
2072_4.c
42 lines (42 loc) · 975 Bytes
/
2072_4.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include<stdio.h>
#include<conio.h>
struct estDate
{
int day;
int month;
int year;
}b;
struct college
{
char name[20];
struct estDate b;
char location[20];
}a[10];
void main()
{
int i;
printf("ENTER COLLEGE INFO:\n");
for(i=0;i<10;i++)
{
printf("\nENTER NAME:");
scanf("%s",&a[i].name);
printf("ENTER ESTABLISHED DATE:\n");
printf("ENTER DAY:");
scanf("%d",&a[i].b.day);
printf("ENTER MONTH:");
scanf("%d",&a[i].b.month);
printf("ENTER YEAR:");
scanf("%d",&a[i].b.year);
printf("ENTER LOCATION:");
scanf("%s",&a[i].location);
}
printf("\nCOLLEGE RECORD\n");
printf("NAME\tESTABLISHED DATE\tLOCATION");
for(i=0;i<10;i++)
{
printf("\n%s",a[i].name);
printf("\t%d/%d/%d",a[i].b.day,a[i].b.month,a[i].b.year);
printf("\t\t\t%s",a[i].location);
}
getch();
}