标签:style blog color 使用 io strong div amp
本题要求编写程序将一个百分制成绩转换为五分制成绩。转换规则:
输入格式:
输入在一行中给出1个整数的百分制成绩。
输出格式:
在一行中输出对应的五分制成绩。
输入样例:
90输出样例:
A
注:也可以使用switch-case实现
#include "stdio.h" int main() { int score=0; scanf("%d",&score); if(score>=90) { printf("A"); } else if(score>=80) { printf("B"); } else if(score>=70) { printf("C"); } else if(score>=60) { printf("D"); } else { printf("E"); } return 0; }
标签:style blog color 使用 io strong div amp
原文地址:http://www.cnblogs.com/keepdoing/p/3916462.html