#include <stdio.h> main( ) { int x; scanf("%d",&x); switch(x/10) { case 10: case 9: printf("优\n");break; case 8: printf("良\n");break; case 7: printf("中等\n");break; case 6: printf("及格\n");break; default:printf("不及格\n"); } }
标签:case,break,70,60,printf,90,80 From: https://www.cnblogs.com/lachesism/p/16708677.html