-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlab5b4.c
More file actions
39 lines (39 loc) · 1.22 KB
/
lab5b4.c
File metadata and controls
39 lines (39 loc) · 1.22 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
#include<stdio.h>
int main(){
int c;
printf("SO THICH CA NHAN\n");
printf("======================\n");
printf("1. Doc sach.\n");
printf("2. Nghe nhac.\n");
printf("3. Choi the thao.\n");
printf("4. May tinh.\n");
printf("5. Thoat.\n");
printf("============================\n");
printf("Chon: ");
do{
printf("Chon so thich cua ban (1-4) hoac chonj 5 de thoat chuong trinh: ");
scanf("%d", &c);
switch (c)
{
case 1:
printf("SO THICH CUA BAN la: Doc sach\n");
break;
case 2:
printf("SO THICH CUA BAN la: Nghe nhac\n");
break;
case 3:
printf("SO THICH CUA BAN la: Choi the thao\n");
break;
case 4:
printf("SO THICH CUA BAN la: May tinh\n");
break;
case 5:
printf("Da thoat chuong trinh\n");
break;
default:
printf("Nhap lai so trong bang\n");
break;
}
} while (c != 5);
return 0;
}