Guest User

Untitled

a guest
Jun 23rd, 2018
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. // WMS Grade translator.cpp
  2. #include "stdafx.h"
  3. #include <iostream>
  4. using namespace std;
  5.  
  6. int main () {
  7. int grade;
  8. bool done = false;
  9. int option;
  10. while (done == false) {
  11. cout << "Hello and welcome to the number to letter translator for WMS grading scale" << endl;
  12. cout << "Please enter your number grade: ";
  13. cin >> grade;
  14.  
  15. if (grade >= 94 && grade <= 100 )
  16. cout << "You got an A!" << endl;
  17. else if (grade >= 87 && grade <= 93)
  18. cout << "You got a B!" << endl;
  19. else if (grade >= 76 && grade <= 86)
  20. cout << "You got a C!" << endl;
  21. else if (grade >= 65 && grade <= 75)
  22. cout << "You got a D!" << endl;
  23. else if (grade >= 0 && grade <= 64 )
  24. cout << "You got a F!" << endl;
  25. else
  26. cout << "Invalid Input" << endl;
  27. cout << "Press 1 to test another grade. Press 2 to end the program: ";
  28. cin >> option;
  29. if (option == 1)
  30. done = false;
  31. else if (option == 2)
  32. done = true;
  33. else
  34. cout << "Invalid Input" << endl;
  35. }
  36.  
  37.  
  38. cin.get ();
  39. return 0;
  40. }
Add Comment
Please, Sign In to add comment