Guest User

Untitled

a guest
May 24th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main() {
  6. int valueone;
  7. int valuetwo;
  8. int decision;
  9.  
  10. cout << "Please input two numbers and I will add, subtract, multiply, or divide them for you." << endl;
  11. cin >> valueone;
  12. cin >> valuetwo;
  13.  
  14. 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;
  15. cin >> decision;
  16.  
  17. if (decision == 1) {
  18. cout << "Your two numbers equal:\r\n" << valueone + valuetwo << endl;
  19. }
  20.  
  21. else if (decision == 2) {
  22. cout << "Your two numbers equal:\r\n" << valueone - valuetwo << endl;
  23.  
  24. }
  25.  
  26. else if (decision == 3) {
  27. cout << "Your two numbers equal:\r\n" << valueone * valuetwo << endl;
  28.  
  29. }
  30.  
  31. else if (decision == 4) {
  32. cout << "Your two numbers equal:\r\n" << valueone / valuetwo << endl;
  33.  
  34. }
  35.  
  36. else if (decision == 5) {
  37.  
  38.  
  39. }
  40. system("pause");
  41. return 0;
  42. }
Add Comment
Please, Sign In to add comment