Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <math.h>
- using namespace std;
- double max(double a, double b) {
- if (a > b)
- return a;
- else
- return b;
- }
- int main() {
- setlocale(LC_ALL, "rus");
- double x, y, z;
- cout << "Введите x: ";
- cin >> x;
- cout << "Введите y: ";
- cin >> y;
- z = max(x, y);
- cout << "z = " << z;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement