fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int nilai;
  6. cin >> nilai;
  7. if(86 <= nilai && nilai <= 100)
  8. cout << "A" << endl;
  9. else if(71 <= nilai && nilai <= 85)
  10. cout << "B" << endl;
  11. else if(56 <= nilai && nilai <= 70)
  12. cout << "C" << endl;
  13. else if(41 <= nilai && nilai <= 55)
  14. cout << "D" << endl;
  15. else
  16. cout << "E" << endl;
  17. return 0;
  18. }
Success #stdin #stdout 0.01s 5284KB
stdin
80
stdout
B