Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- int valueone;
- int valuetwo;
- int decision;
- cout << "Please input two numbers and I will add, subtract, multiply, or divide them for you." << endl;
- cin >> valueone;
- cin >> valuetwo;
- cout << "Ok so your numbers are " << valueone << " and " << valuetwo << "\r\nPlease select a number so I can use the appropriate actions for your two numbers\r\n\r\n1.Add\r\n2.Subtract\r\n3.Multiply\r\n4.Divide\r\n5.Quit" << endl;
- cin >> decision;
- if (decision == 1) {
- cout << "Your two numbers equal:\r\n" << valueone + valuetwo << endl;
- }
- else if (decision == 2) {
- cout << "Your two numbers equal:\r\n" << valueone - valuetwo << endl;
- }
- else if (decision == 3) {
- cout << "Your two numbers equal:\r\n" << valueone * valuetwo << endl;
- }
- else if (decision == 4) {
- cout << "Your two numbers equal:\r\n" << valueone / valuetwo << endl;
- }
- else if (decision == 5) {
- }
- system("pause");
- return 0;
- }
Add Comment
Please, Sign In to add comment