c语言 输入一个学生成绩,判断优、良、及格?

[复制链接]
查看11 | 回复5 | 2018-4-5 13:20:25 | 显示全部楼层 |阅读模式
#includeint main(){int nscore = 0;scanf("%d",&nscore);if ( nscore > 90 ){printf("成绩优!\n");}else if ( nscore > 80 ){printf("成绩良!\n");}else if ( nscore > 60 ){printf("成绩及格!\n");}else{printf("成绩不及格!\n");}return 0;}...
回复

使用道具 举报

千问 | 2018-4-5 13:20:25 | 显示全部楼层
#includeint main(){
int score;
printf("请输入分数:\n");
scanf("%d",&score);
switch(score/10){
case 10:
...
回复

使用道具 举报

千问 | 2018-4-5 13:20:25 | 显示全部楼层
#include#includeint main() { while(1){int n = 0;printf("输入成绩(-1退出):");scanf("%d",&n);if(n == -1){return 0;}switch(n/10){case 6:...
回复

使用道具 举报

千问 | 2018-4-5 13:20:25 | 显示全部楼层
#includevoid main(){int score ;scanf("%d",&score);if ( score > 90 ){printf("成绩优秀\n");}else if ( score > 80 ){printf("成绩良好\n");}else ...
回复

使用道具 举报

千问 | 2018-4-5 13:20:25 | 显示全部楼层
1 #include 2 3 int main()4 {5
while(1)6
{7
int num;8
printf("input a scores:");9
sc...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行