赞
踩
#include <stdio.h> #include <stdlib.h> int main() { int a; printf("请输入你的成绩:"); scanf("%d",&a); printf("你的等级是:"); switch(a/10) { case 10:printf("A\n");break; case 9:printf("A\n");break; case 8:printf("B\n");break; case 7:printf("C\n");break; case 6:printf("D\n");break; case 5:printf("E\n");break; case 4: case 3: case 2: case 1: case 0: default:printf("你输入的成绩有误\n"); } system("pause"); return 0; }
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。