这样写也对吧
#include <stdio.h> int main() { int score = 87; //考试分数为87分 switch(score/10) { case 10:break; case 9: printf("等级A"); break; case 8: printf("等级B"); break; case 7:break; case 6: printf("等级C"); break; default: printf("等级D"); break; } return 0;}
#include <stdio.h> int main() { int score = 87; //考试分数为87分 switch(score/10) { case 10:break; case 9: printf("等级A"); break; case 8: printf("等级B"); break; case 7:break; case 6: printf("等级C"); break; default: printf("等级D"); break; } return 0;}
2019-10-23
举报