2 Star 2 Fork 0

sjbb666/c语言牛刀小试

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
switch求等地.c 530 Bytes
一键复制 编辑 原始数据 按行查看 历史
sjbb666 提交于 2023-11-16 12:17 +08:00 . c语言
#include<stdio.h>
int main()
{
int score;
printf("Your score");
scanf("%d",&score);
switch(score/10)
{
case 10:
case 9:printf("Your grade is A\n");break;
case 8:printf("Your grade is B\n");break;
case 7:printf("Your grade is C\n");break;
case 6:printf("Your grade is D\n");break;
case 5:printf("Your grade is E\n");break;
case 4:
case 3:
case 2:
case 1:
default:printf("enter data is error\n");
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/sjbb666/c-language-knife-test.git
git@gitee.com:sjbb666/c-language-knife-test.git
sjbb666
c-language-knife-test
c语言牛刀小试
master

搜索帮助