fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int m;
  6. cout << "Enter your mark from 0 to 100: ";
  7. cin >> m;
  8.  
  9. if (m >= 90)
  10. {
  11. cout << "A";
  12. }
  13. else if(m >= 80)
  14. {
  15. cout << "B";
  16. }
  17. else if (m >= 70)
  18. {
  19. cout << "C";
  20. }
  21. else if (m >= 60)
  22. {
  23. cout << "D";
  24. }
  25. else
  26. {
  27. cout << "F";
  28. }
  29. return 0;
  30. }
Success #stdin #stdout 0.01s 5320KB
stdin
75
stdout
Enter your mark from 0 to 100: C