EricJohnson

calc_menu

Apr 4th, 2012
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.49 KB | None | 0 0
  1. #ifndef GLIBCXX_IOSTREAM
  2. #include <iostream>
  3. #endif
  4. using namespace std;
  5. char again;
  6. char menu(double a, double b, double answer, char operation, char again)
  7. {
  8. cout << "This is the first operand: " << a << endl;
  9. cout << "This is the second operand: " << b << endl;
  10. cout << "This is the answer from the operation performed: " << answer << endl;
  11. cout << "This is the operation performed: " << operation << endl;
  12. cout << "Would you like to run again(y/n)? ";
  13. cin >> again;
  14. return again;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment