fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int gread;
  6.  
  7. cout << "------------------------------" << endl;
  8. cout << " Welcome to Grade Checker " << endl;
  9. cout << "------------------------------" << endl;
  10.  
  11. cout << "Please enter your grade: ";
  12. cin >> gread;
  13.  
  14. cout << "Your result is: ";
  15.  
  16. if (gread >= 95) {
  17. cout << "A+";
  18. }
  19. else if (gread >= 90) {
  20. cout << "A";
  21. }
  22. else if (gread >= 85) {
  23. cout << "B+";
  24. }
  25. else if (gread >= 80) {
  26. cout << "B";
  27. }
  28. else if (gread >= 75) {
  29. cout << "C+";
  30. }
  31. else if (gread >= 70) {
  32. cout << "C";
  33. }
  34. else if (gread >= 65) {
  35. cout << "D+";
  36. }
  37. else if (gread >= 60) {
  38. cout << "D";
  39. }
  40. else {
  41. cout << "F";
  42. }
  43.  
  44. cout << endl << "------------------------------" << endl;
  45.  
  46. return 0;
  47. }
  48.  
Success #stdin #stdout 0.01s 5320KB
stdin
55
stdout
------------------------------
   Welcome to Grade Checker   
------------------------------
Please enter your grade: Your result is: F
------------------------------