forked from Nivedpv2004/C-PROGRAMING
-
Notifications
You must be signed in to change notification settings - Fork 0
/
travel_agency.c
57 lines (50 loc) · 1.51 KB
/
travel_agency.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#include<stdio.h>
#include<string.h>
struct agency{
char name[32];
char liscence[32];
char route[32];
int kms;
} d1,d2,d3;
int main(){
printf("Enter name of driver 1\n");
scanf("%s",d1.name);
printf("Enter name of driver 2\n");
scanf("%s",d2.name);
printf("Enter name of driver 3\n");
scanf("%s",d3.name);
printf("Enter liscence num of driver 1\n");
scanf("%s",d1.liscence);
printf("Enter liscence num of driver 2\n");
scanf("%s",d2.liscence);
printf("Enter liscence num of driver 3\n");
scanf("%s",d3.liscence);
printf("Enter route name of driver 1\n");
scanf(" %s",d1.route);
printf("Enter route name of driver 2\n");
scanf(" %s",d2.route);
printf("Enter route name of driver 3\n");
scanf(" %s",d3.route);
printf("Enter kilometres of driver 1\n");
scanf(" %d",&d1.kms);
printf("Enter kilometres of driver 2\n");
scanf(" %d",&d2.kms);
printf("Enter kilometres of driver 3\n");
scanf(" %d",&d3.kms);
printf("details for driver 1\n");
printf("Name is %s\n",d1.name);
printf("liscence is %s\n",d1.liscence);
printf("route is %s\n",d1.route);
printf("kms is %d\n",d1.kms);
printf("details for driver 2\n");
printf("Name is %s\n",d2.name);
printf("liscence is %s\n",d2.liscence);
printf("route is %s\n",d2.route);
printf("kms is %d\n",d2.kms);
printf("details for driver 3\n");
printf("Name is %s\n",d3.name);
printf("liscence is %s\n",d3.liscence);
printf("route is %s\n",d3.route);
printf("kms is %d\n",d3.kms);
return 0;
}