Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<string>
- using namespace std;
- int x,y;
- int kefel(int x,int y) {
- return x*y;
- }
- int veod(int x,int y) {
- return x+y;
- }
- int pahut(int x,int y) {
- return x-y;
- }
- double hiluk(double x, double y) {
- return x/y;
- }
- void get_numbers() {
- cout << "Enter x : ";
- cin >> x;
- cout << "Enter y : ";
- cin >> y;
- }
- void print_result() {
- get_numbers();
- cout << x << " + " << y << " = " << veod(x,y) << endl;
- cout << x << " - " << y << " = " << pahut(x,y) << endl;
- cout << x << " x " << y << " = " << kefel(x,y) << endl;
- cout << x << " / " << y << " = " << hiluk(x,y) << endl;
- }
- int main() {
- print_result();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement