fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int n;
  6. cin >> n;
  7.  
  8. if(n >= 90)
  9. cout << "A" << endl;
  10. else if(n >= 80)
  11. cout << "B" << endl;
  12. else if(n >= 70)
  13. cout << "C" << endl;
  14. else if(n >= 60)
  15. cout << "D" << endl;
  16. else
  17. cout << "F" << endl;
  18.  
  19. return 0;
  20. }
Success #stdin #stdout 0.01s 5312KB
stdin
50
stdout
F