感觉 你这编译成功 就是个错误呢
case 10: 有空格没?(有点懵)
#include<stdio.h> void main() { int a = 0; scanf("%d", &a); if (a > 100) a += 10; switch (a / 10) { case 10: case 9: printf("A"); break; case 8: printf("B"); break; case 7: printf("C"); break; case 6: printf("D"); break; case 5: case 4: case 3: case 2: case 1: case 0: printf("F"); break; default: printf("输入数据错误"); } }