fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int grade;
  8. cout << "Please enter the marks to find the grade" << endl;
  9. cin >> grade;
  10. if(grade >=90)
  11. {
  12. cout << "student has got a grade A" << endl;
  13. }
  14. else if(grade >= 80)
  15. {
  16. cout << "student has got a grade B" << endl;
  17. }
  18. else if(grade >= 70)
  19. {
  20. cout << "student has got a grade C" << endl;
  21. }
  22. else if(grade >= 60)
  23. {
  24. cout << "student has got a grade D" << endl;
  25. }
  26. else
  27. {
  28. cout << "student has got F"<< endl;
  29. }
  30. return 0;
  31. }
Success #stdin #stdout 0s 3348KB
stdin
90
stdout
Please enter the marks to find the grade
student has got a grade A