Ответы на вопрос:
#pascal
program xy;
uses crt;
var x: real;
y: integer;
begin
clrscr;
writeln('enter x');
readln(x);
if x > 0 then y : = 1
else
if x < 0 then y : = -1
else y : = 0;
writeln('y is ', y);
readln
end.
var x,y: integer;
begin
readln(x);
if(x> 0) then y: =1
else begin
if(x< 0) then y: =-1
else y: =0;
end;
writeln(y);
end.
Популярно: Информатика
-
MasterDrenZik12.08.2022 22:32
-
lizarodkina12.09.2020 00:14
-
Малика2507200202.01.2023 01:48
-
skutovakseniya200405.09.2020 14:42
-
Ирина1512301010.04.2020 10:35
-
КукуцапольОрегинал04.06.2020 07:43
-
alinkaaa307.01.2022 06:22
-
alisaBacura01.12.2021 15:24
-
aliaidi25.12.2020 21:18
-
У4КГРВ29.04.2023 19:59