Вопрос задан 17.02.2019 в 23:30. Предмет Информатика. Спрашивает Фурсенко Артём.

Даны два действительных различных числа х и у. Заменить меньшее из этих двух чисел и полусуммой,а

большее их утроенной полуразность?
0 0
Перейти к ответам

Ответы на вопрос

Внимание! Ответы на вопросы дают живые люди. Они могут содержать ошибочную информацию, заблуждения, а также ответы могут быть сгенерированы нейросетями. Будьте внимательны. Если вы уверены, что ответ неверный, нажмите кнопку "Пожаловаться" под ответом.
Отвечает Хрусталева Кристина.

var i,jx,y:longint;

begin

read(x,y):

i:=x;

j:=y

if x<y then begin x:= (i+j) div 2; y:= 3*((i+y)div2);

if y<x then begin y:= (i+j) div 2; x:= 3*((i+y)div2);

writeln(x,' ',y);

end.

0 0
Отвечает Орынбасаров Елдос.

var
x, y : real;
begin
readln (x, y);
if x < y then
begin
x := (x + y) / 2;
y := 6 * abs (x - y); 
end
else
begin
y := (y + x) / 2;
x := 6 * abs (y - x);
end;
writeln (x, ' ', y);
readln;
end.

0 0
Отвечает нейросеть ChatGpt. Будьте внимательны, ответы нейросети могут содержать ошибочные или выдуманные данные.

Solving the Mathematical Problem

To solve the given problem, we need to replace the smaller of the two different real numbers, x and y, with their half-sum, and the larger one with three times the half-difference.

Let's denote the two different real numbers as x and y.

1. Identify the Smaller and Larger Numbers: - Let's assume x is the smaller number and y is the larger number.

2. Calculate the Half-Sum and Half-Difference: - The half-sum of x and y is given by: (x + y) / 2 - The half-difference of x and y is given by: |x - y| / 2

3. Replace the Numbers: - Replace the smaller number (x) with the half-sum: (x + y) / 2 - Replace the larger number (y) with three times the half-difference: 3 * |x - y| / 2

Applying the Formulas

Let's apply the formulas to solve the problem:

- The half-sum of x and y: (x + y) / 2- The half-difference of x and y: |x - y| / 2- Replace the smaller number (x) with the half-sum: (x + y) / 2 - Replace the larger number (y) with three times the half-difference: 3 * |x - y| / 2

Therefore, the solution to the given problem is to replace the smaller of the two numbers with their half-sum, and the larger one with three times the half-difference.

0 0

Топ вопросов за вчера в категории Информатика

Последние заданные вопросы в категории Информатика

Задать вопрос