1500字范文,内容丰富有趣,写作好帮手!
1500字范文 > C语言输入成绩等级输出对应分数段

C语言输入成绩等级输出对应分数段

时间:2019-10-21 10:00:49

相关推荐

C语言输入成绩等级输出对应分数段

#include <stdio.h>#include <stdlib.h>/* run this program using the console pauser or add your own getch, system("pause") or input loop */int main(int argc, char *argv[]) {int chengji;printf("请输入成绩:");scanf("%C",&chengji);switch(chengji){ case 'A':printf("85-100\n");break; case 'B':printf("70-84\n");break;case 'C':printf("60-69\n");break;case 'D':printf("<60\n");break;default: printf("输入错误。\n");}return 0;}

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。