zimin0082
?>

A. A + B (float) time limit per test: 1 second memory limit per test: 256 megabytes input: standard input output: standard output You are given two decimals a and b. Print a + b. Input The first line contains a decimal a and the second line contains a decimal b(-1000.0 Sa, b S 1000.0 Output Print a + b. Examples input 3.6 4.25 output 7.85 input 7.23 -3.33 output 3.9 input -5.68 -11.789 output -17.469

Информатика

Ответы

Валентина980

#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;

}

Объяснение:

Надеюсь, тебе не поставят два за это

Замени мои матные выражения в "" и можешь сдавать

Ответить на вопрос

Поделитесь своими знаниями, ответьте на вопрос:

A. A + B (float) time limit per test: 1 second memory limit per test: 256 megabytes input: standard input output: standard output You are given two decimals a and b. Print a + b. Input The first line contains a decimal a and the second line contains a decimal b(-1000.0 Sa, b S 1000.0 Output Print a + b. Examples input 3.6 4.25 output 7.85 input 7.23 -3.33 output 3.9 input -5.68 -11.789 output -17.469
Ваше имя (никнейм)*
Email*
Комментарий*

Популярные вопросы в разделе

ИльяАндреевич-Мария
vasearu
alex07071
artem-whitenoise142
Galina-3639220565
barg562
supply1590
Vladimirovich1898
marinamarinyuk39
Aleksandr72
laplena1982750
jeep75
irinakiral
Носов Тоноян
ekatef45