Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // WMS Grade translator.cpp
- #include "stdafx.h"
- #include <iostream>
- using namespace std;
- int main () {
- int grade;
- bool done = false;
- int option;
- while (done == false) {
- cout << "Hello and welcome to the number to letter translator for WMS grading scale" << endl;
- cout << "Please enter your number grade: ";
- cin >> grade;
- if (grade >= 94 && grade <= 100 )
- cout << "You got an A!" << endl;
- else if (grade >= 87 && grade <= 93)
- cout << "You got a B!" << endl;
- else if (grade >= 76 && grade <= 86)
- cout << "You got a C!" << endl;
- else if (grade >= 65 && grade <= 75)
- cout << "You got a D!" << endl;
- else if (grade >= 0 && grade <= 64 )
- cout << "You got a F!" << endl;
- else
- cout << "Invalid Input" << endl;
- cout << "Press 1 to test another grade. Press 2 to end the program: ";
- cin >> option;
- if (option == 1)
- done = false;
- else if (option == 2)
- done = true;
- else
- cout << "Invalid Input" << endl;
- }
- cin.get ();
- return 0;
- }
Add Comment
Please, Sign In to add comment