#include <iostream> using std::cout; using std::cin;
int main() { setlocale (LC_ALL,"Russian"); int x,y; cout <<"X: "; cin >> x; cout <<"Y: "; cin >> y; cout <<"Точка А расположена"; if (x==0 && y==0) cout <<" в начале координат\n"; else if (x==0) cout <<" на оси Y\n"; else if (y==0) cout <<" на оси X\n"; else if (x>0 && y>0) cout <<" в 1 угле\n"; else if (x<0 && y>0) cout <<" во 2 угле\n"; else if (x<0 && y<0) cout <<" в 3 угле\n"; else cout <<" в 4 угле\n"; return 0; }
Var x1, x2, y1, y2: integer; O: boolean; begin write('X1: '); readln(x1); write('Y1: '); readln(y1); write('X2: '); readln(x2); write('Y2: '); readln(y2); if (x1 < 0) and (x2 < 0) and (y1 < 0) and (y2 < 0) then O:=true; if (x1 < 0) and (x2 < 0) and (y1 > 0) and (y2 > 0) then O:=true; if (x1 > 0) and (x2 > 0) and (y1 > 0) and (y2 > 0) then O:=true; if (x1 > 0) and (x2 > 0) and (y1 < 0) and (y2 < 0) then O:=true; if O = true then write('TRUE') else write('FALSE'); end.
Переменная
Объяснение:
Я понимаю что уже поздно но я только заметил...