Advertisement
Shad0w

Untitled

Dec 27th, 2011
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.65 KB | None | 0 0
  1. #include<iostream>
  2. #include<string>
  3. using namespace std;
  4. int x,y;
  5. int kefel(int x,int y) {
  6.     return x*y;
  7. }
  8. int veod(int x,int y) {
  9.     return x+y;
  10. }
  11. int pahut(int x,int y) {
  12.     return x-y;
  13. }
  14. double hiluk(double x, double y) {
  15.     return x/y;
  16. }
  17. void get_numbers() {
  18.     cout << "Enter x : ";
  19.     cin >> x;
  20.     cout << "Enter y : ";
  21.     cin >> y;
  22. }
  23. void print_result() {
  24.     get_numbers();
  25.     cout << x << " + " << y << " = " << veod(x,y) << endl;
  26.     cout << x << " - " << y << " = " << pahut(x,y) << endl;
  27.     cout << x << " x " << y << " = " << kefel(x,y) << endl;
  28.     cout << x << " / " << y << " = " << hiluk(x,y) << endl;
  29. }
  30. int main() {
  31.     print_result();
  32.     return 0;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement