-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathb1c7.c
More file actions
75 lines (71 loc) · 1.37 KB
/
b1c7.c
File metadata and controls
75 lines (71 loc) · 1.37 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
#include<string.h>
struct hoten{
char ho[100];
char tendem[100];
char ten[100];
};
struct quequan{
char xa[100];
char huyen[100];
char tinh[100];
};
struct diem{
float diemtoan;
float diemly;
float diemhoa;
};
struct sinhvien{
struct hoten ht;
struct quequan qq ;
char truong[100];
int tuoi;
int sbd;
struct diem d ;
};
int main()
{
struct sinhvien sv;
printf("nhap thong tin thi sinh\n");
printf("SBD: ");
scanf("%d", &sv.sbd);
fflush(stdin);
printf("Truong: ");
gets(sv.truong);
printf("Tuoi: ");
scanf("%d", &sv.tuoi);
fflush(stdin);
printf("Ho va ten:\n");
printf("ho: ");
gets( sv.ht.ho);
fflush(stdin);
printf("Ten dem: ");
gets(sv.ht.tendem);
fflush(stdin);
printf("Ten: ");
gets(sv.ht.ten);
fflush(stdin);
printf("Que quan: \n");
printf("Xa: ");
gets(sv.qq.xa);
fflush(stdin);
printf("Huyen: ");
gets(sv.qq.huyen);
fflush(stdin);
printf("Tinh: ");
gets(sv.qq.tinh);
fflush(stdin);
printf("Diem: \n");
printf("Diem Toan: ");
scanf("%d", &sv.d.diemtoan);
fflush(stdin);
printf("Diem Ly: ");
scanf("%d", &sv.d.diemly);
fflush(stdin);
printf("Diem Hoa: ");
scanf("%d", &sv.d.diemhoa);
fflush(stdin);
return 0;
}