Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- int n1, n2, t;
- char response;
- do {
- system("cls");
- cout << "Problem 5 - Run Run Run\n";
- cout << "-----------------------------\n";
- cout << "1st Number: ";
- cin >> n1;
- cout << "2nd Number: ";
- cin >> n2;
- t = n1+n2;
- cout << "The sum is: ";
- cout << t << "\n\n\n";
- cout << "Run the program again? \n";
- cout << "[Y]es or any key to STOP! : ";
- cin >> response;
- } while (response == 'Y' || response == 'y');
- cout << "\n";
- return 0;
- }
Add Comment
Please, Sign In to add comment