fork download
  1. #include <stdio.h>
  2.  
  3. int main() {
  4. int mark;
  5.  
  6. printf("Enter your mark (0-100): ");
  7. scanf("%d", &mark);
  8.  
  9. if(mark >= 90) {
  10. printf("A\n");
  11. }
  12. else if(mark >= 80) {
  13. printf("B\n");
  14. }
  15. else if(mark >= 70) {
  16. printf("C\n");
  17. }
  18. else if(mark >= 60) {
  19. printf("D\n");
  20. }
  21. else {
  22. printf("F\n");
  23. }
  24.  
  25. return 0;
  26. }
Success #stdin #stdout 0.01s 5320KB
stdin
Standard input is empty
stdout
Enter your mark (0-100): F