1
0
mirror of https://github.com/renbaoshuo/202401-programming-assignments.git synced 2024-11-23 21:58:41 +00:00
202401-programming-assignments/【额外练习】选择结构/7-32 选择-扑克.c

22 lines
330 B
C
Raw Normal View History

2024-10-30 15:00:18 +00:00
#include <stdio.h>
int main() {
int n;
scanf("%d", &n);
if (n >= 1 && n <= 10) {
printf("%d\n", n);
} else if (n == 11) {
printf("J\n");
} else if (n == 12) {
printf("Q\n");
} else if (n == 13) {
printf("K\n");
} else {
printf("NO\n");
}
return 0;
}