1
0
mirror of https://github.com/renbaoshuo/202401-programming-assignments.git synced 2024-11-27 08:26:20 +00:00
202401-programming-assignments/【额外练习】选择结构/7-22 选择-销售菜单.c

32 lines
430 B
C
Raw Normal View History

2024-10-30 15:00:18 +00:00
#include <stdio.h>
int main() {
int n;
scanf("%d", &n);
switch (n) {
case 1:
printf("8\n");
break;
case 2:
printf("4.5\n");
break;
case 3:
printf("12.8\n");
break;
case 4:
printf("3\n");
break;
default:
printf("Exit\n");
break;
}
return 0;
}