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

来源:互联网 发布:根据端口号查找进程 编辑:程序博客网 时间:2024/05/04 04:32
#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;}

阅读全文
0 0