#include <stdio.h>
|
|
#include <conio.h>
|
|
|
|
main()
|
|
{
|
|
//Trang tri chuong trinh
|
|
int
i;
|
|
printf("\t");
|
|
for
(i=1;i<30;i++) printf("* ");
|
|
printf("\n\t\t CHUONG TRINH KIEM TRA KY
TU MA HEXA\n\n");
|
|
//Het doan chuong trinh trang tri
|
|
|
|
char ch;
|
|
printf("\t- Nhap vao ky tu ma hex:
"); scanf("%c",&ch);
|
|
|
|
switch (ch)
|
|
{
|
|
case 'A': printf("\n\t=> Ky tu A
co ma hex la 10");
|
|
break;
|
|
case 'B': printf("\n\t=> Ky tu B
co ma hex la 11");
|
|
break;
|
|
case 'C': printf("\n\t=> Ky tu C
co ma hex la 12");
|
|
break;
|
|
case 'D': printf("\n\t=> Ky tu D
co ma hex la 13");
|
|
break;
|
|
case 'E': printf("\n\t=> Ky tu E
co ma hex la 14");
|
|
break;
|
|
case 'F': printf("\n\t=> Ky tu F
co ma hex la 15");
|
|
break;
|
|
default : printf("\n\t=> He thap
luc phan khong dung ky so nay!");
|
|
}
|
|
|
|
|
|
|
|
getch();
|
|
return 0;
|
|
}
|
0 nhận xét:
Đăng nhận xét