9. Переменной k присвоить номер четверти плоскости, в которой находится точка с координатами (x,y)(xy не равно 0). Вывести на экран номер четверти.
Ответы
Ответ дал:
0
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.
Вас заинтересует
2 года назад
2 года назад
6 лет назад
6 лет назад
9 лет назад
9 лет назад
9 лет назад