fork download
  1. #include <stdio.h>
  2.  
  3. int main() {
  4. int x;
  5. scanf("%d",&x);
  6. if (x >= 90 && x <= 100)
  7. printf(" S\n");
  8. else if (80 <= x && x <90)
  9. printf(" A\n");
  10. else if (x > 100)
  11. printf("エラー\n");
  12. else if (60 <= x && x < 80)
  13. printf(" B\n");
  14. else
  15. printf(" D\n");
  16. return 0;
  17. }
  18.  
Success #stdin #stdout 0.01s 5296KB
stdin
1000
stdout
エラー