Advertisement
Guest User

Untitled

a guest
Dec 14th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. _______ <iostream>
  2.  
  3.  
  4. ___ multiply(int x, int y)
  5. {
  6. ______ x_y;
  7. }
  8.  
  9.  
  10. ____ divide(int x, int y)
  11. {
  12. _____ x_y;
  13. }
  14.  
  15. _____ add(int x, int y)
  16. {
  17. ______x_y;
  18. }
  19.  
  20. ______ subtract(int x, int y)
  21. {
  22. _____x_y;
  23. }
  24.  
  25.  
  26. using namespace std;
  27.  
  28. ___ _____()
  29. {
  30. ____ op='c';
  31. ____ x, y;
  32. while(op!='e')
  33. {
  34. cout__"What operation would you like to perform: add(+), subtract(-), divide(/),
  35. multiply(*), [e]xit?";
  36. cin__op;
  37. switch(op)
  38. {
  39. ____ '+':
  40. cin__x;
  41. cin__y;
  42. cout__x__"+"__y__"="__add(x, y)__endl_
  43. break;
  44. ____ '-'_
  45. cin__x;
  46. cin__y;
  47. cout__x__"-"__y__"="__subtract(x, y)__endl_
  48. break;
  49. ____ '/':
  50. cin__x;
  51. cin__y;
  52. cout__x__"/"__y__"="__divide(x, y)__endl_
  53. break;
  54. ____ '*'_
  55. cin__x;
  56. cin__y;
  57. cout__x__"*"__y__"="__multiply(x, y)__endl_
  58. break;
  59. _____ 'e':
  60. ______;
  61. ______:
  62. cout__"Sorry, try again"__endl;
  63. }
  64. }
  65. return _;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement