#include <iostream>
#include <math.h>
const double g = 9.08665;
int main() {
unsigned int h;
std::cout << "Enter height of tree :" ;
std::cin>> h;
if (std::cin.fail()) // если предыдущее извлечение оказалось неудачным,
{
std::cin.clear();
std::cin.ignore(32767,'\n');
std::cout << "Please die";
return 2;
}
if(h == 0) {
std::cout<<"You are stupid! Apple is on the earth\n";
return 1;
}
std::cout<<"Program is thinking, but you no!\n";
double t = sqrt(2 * h / g);
std::cout << "Time is " << t << "\n";
std::cout << "Goodbye asshole\n";
return 0;
}
Объяснение:
Надеюсь, тебе не поставят два за это
Замени мои матные выражения в "" и можешь сдавать
Поделитесь своими знаниями, ответьте на вопрос:
var
x, y, z, res : real;
function min2 (a, b : real) : real;
begin
if a < b then min2 : = a else min2 : = b;
end;
begin
read (x, y, z);
res : = min2 (x + y + z / 2, x* y * z)+1;
writeln (res);
end.