#include <iostream>
#include <cmath>
using namespace std;
int main()
{
int x, y, z;
cout << "Enter x: ";
cin >> x;
cout << "Enter y: ";
cin >> y;
cout << "Enter z: ";
cin >> z;
int max, min, min1, u = 0;
if (x > y && x > z)
max = x;
if (y > z && y > x)
max = y;
if (z > y && z > x)
max = z;
if (x < y && x < z)
min = x;
if (y < z && y < x)
min = y;
if (z < y && z < x)
min = z;
if (x < z)
min1 = x;
if (z < x)
min1 = z;
u = (max / min) + min1;
cout << "u = " << u << endl;
getchar();
getchar();
return 0;
}
Перед публікацією, радимо ознайомиться з правилами!
Знайшли помилку?
Ви можете повідомити про це адміністрацію.
Виділіть текст і натисніть CTRL+Enter