fork download
  1. #include<stdio.h>
  2. int main()
  3. {
  4. double x;
  5. int i;
  6. scanf("%lf",&x);
  7. if(x>=0&&x<=100)
  8. {
  9. i=x/10;
  10. switch(i)
  11. {
  12. case 10:
  13. case 9:printf("A");break;
  14. case 8:printf("B");break;
  15. case 7:printf("C");break;
  16. case 6:printf("D");break;
  17. default:printf("ERR");
  18. }
  19. }
  20. return 0;
  21. }
Success #stdin #stdout 0s 5288KB
stdin
50
stdout
ERR