data: изменение типа

double
Alice (MachulinaDV) 2 лет назад
Родитель a89ab56a70
Сommit 10a168f4bb

@ -7,8 +7,13 @@ int main()
{
cout << "Enter A and B: ";
int a, b;
double a, b, max, min;
cin >> a >> b;
cout << "A + B = " << a + b << '\n' << "A - B = " << a - b << '\n' << "A * B = " << a * b << '\n' << "A * B = " << a * b << '\n' << "A / B = " << a / b << '\n';
if (a > b)
a = max;
b = min;
cout << "A + B = " << a + b << '\n' << "A - B = " << a - b << '\n' << "A * B = " << a * b << '\n' << "A * B = " << a * b << '\n' << "A / B = " << a / b << '\n' << "MAX = " << max << '\n' << "MIN = " << min;
}
Загрузка…
Отмена
Сохранить