fork(1) download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int g;
  5. printf("请输入成绩:\n");
  6. scanf("%d",&g);
  7. if(g>=100)printf("该成绩不合法");
  8. else if(g>=90)printf("A");
  9. else if(g>=80)printf("B");
  10. else if(g>=70)printf("C");
  11. else if(g>=60)printf("D");
  12. else if(g>=0)printf("E");
  13. else printf("该成绩不合法");
  14. return 0;
  15. }
  16.  
Success #stdin #stdout 0s 5316KB
stdin
50
stdout
请输入成绩:
E