
Gavinrandis
5 год назад
9. Переменной k присвоить номер четверти плоскости, в которой находится точка с координатами (x,y)(xy не равно 0). Вывести на экран номер четверти.
ОТВЕТЫ

Нина
Oct 24, 2020
program glghn;
var k,x,y:integer;
begin
readln(x,y);
if (x<0) and (y>0) then writeln(1);
if (x>0) and (y>0) then writeln(2);
if (x<0) and (y<0) then writeln(3);
if (x>0) and (y<0) then writeln(4);
end.
var k,x,y:integer;
begin
readln(x,y);
if (x<0) and (y>0) then writeln(1);
if (x>0) and (y>0) then writeln(2);
if (x<0) and (y<0) then writeln(3);
if (x>0) and (y<0) then writeln(4);
end.
735
Смежные вопросы: