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

stdout
 S