#include <iostream>
using namespace std;
double mx_num(double a, double b);
int main()
{
double a,b;
cout << "Введите число а" << endl;
cin >> a;
cout << "Введите число b" << endl;
cin >> b;
double mx = mx_num(a,b);
cout << "Максимум из двух чисел: " << mx;
}
double mx_num(double a, double b)
{
if(a > b)
{
return a;
}
else
{
return b;
}
}
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter