Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

Turbo Pascal / Stud_1_1 / Metlab / LABOR1 / LABOR1

.PAS
Скачиваний:
94
Добавлен:
03.03.2016
Размер:
1.55 Кб
Скачать
Program Labor1;
Uses Crt;
Var
x,y : real; { Є®®а¤Ё­ вл в®зЄЁ ­  Ї«®бЄ®бвЁ }
ch : char; { бЁ¬ў®« ­ ¦ в®© Є« ўЁиЁ }
Next, { ЇаЁ§­ Є ўў®¤  б«Ґ¤го饩 в®зЄЁ }
Cond : boolean; { ЇаЁ§­ Є ЇаЁ­ ¤«Ґ¦­®бвЁ в®зЄЁ дЁЈгॠ}
Begin
Repeat
ClrScr;
Writeln('‚ўҐ¤ЁвҐ Є®®а¤Ё­ вл в®зЄЁ x, y');
Read(x,y);
Writeln('x = ',x:6:2,' y = ',y:6:2);
Cond:=true;
If (x>=0) and (y>=0) then { ЏҐаўл© Єў ¤а ­в }
Begin
If y>-1.6*x+16 then
Cond:=false;
If (x>=4) and (x<=8) and (sqr(y)+sqr(x-6)<4) then
Cond:=false;
If (x<=2) and (y<8) and (y>4) then
Cond:=false;
End
Else
If (x<=0) and (y>=0) then { ‚в®а®© Єў ¤а ­в }
Begin
If y>0.9*x+9 then
Cond:=false;
If (x>=-8) and (x<=4) and (sqr(y)+sqr(x+6)<4) then
Cond:=false;
End
Else { ’аҐвЁ© Ё зҐвўҐавл© Єў ¤а ­вл }
Begin
If y<0.8*abs(x)-8 then
Cond:=false;
If (abs(x)<=4) and (sqr(x)+sqr(y)<16) then
Cond:=false;
End;
If Cond then
Writeln('’®зЄ  ЇаЁ­ ¤«Ґ¦Ёв дЁЈгаҐ')
Else
Writeln('’®зЄ  ­Ґ ЇаЁ­ ¤«Ґ¦Ёв дЁЈгаҐ');
Writeln('Џа®¤®«¦Ёвм ўў®¤ Є®®а¤Ё­ в (Y/N) ?');
Repeat
ch:=ReadKey;
ch:=UpCase(ch);
If ch='Y' then
Next:=true
Else
If ch='N' then
Next:=false;
Until (ch='Y') or (ch='N');
Until not Next;
End.

Соседние файлы в папке LABOR1