Advertisement
Guest User

Untitled

a guest
Feb 27th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. #include <iostream>
  2. #include <windows.h>
  3. #include <conio.h>
  4.  
  5. using namespace std;
  6.  
  7. int f,e;
  8. char d;
  9.  
  10. kalk (int a, char b, int c)
  11. {
  12. cin >> a;
  13. cin >> b;
  14. cin >> c;
  15. system ("cls");
  16. switch (b)
  17. {
  18. case '*':
  19. cout << a * c;
  20. break;
  21.  
  22. case '/':
  23. cout << a / c;
  24. break;
  25.  
  26. case '+':
  27. cout << a + c;
  28. break;
  29.  
  30. case '-':
  31. cout << a - c;
  32. break;
  33. }
  34. }
  35.  
  36. int main()
  37. {
  38. kalk (f,d,e);
  39.  
  40. getch();
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement