Скачиваний:
289
Добавлен:
04.03.2014
Размер:
5.06 Кб
Скачать
Uses CRT,MOD_D;
var nc:byte;
ch:char;
j,i,m,r:longint;

{$F+}
Function sinus(x:real):real;
begin
sinus:=sin(x);
end;
Function cosinus(x:real):real;
begin
cosinus:=cos(x);
end;
Function Tg(x:real):real;
begin
if cos(x)=0 Then begin ClrScr;TextColor(14);
Writeln('ЋиЁЎЄ  ўлзҐб«Ґ­Ёп Tg');exit;end;
tg:=sin(x)/cos(x);
end;

Function super_good(x:real):real;
begin
super_good:=cos(x);
end;
{$F-}

procedure w(n:integer);
var nc:byte;
begin
textbackground(0);
clrscr;
Clrscr;
textcolor(15);
textbackground(1);
window(10,2,60,4);
clrscr;
Writeln;
write(' Ћ ‘ Ќ Ћ ‚ Ќ Ћ … Њ … Ќ ћ');
if n=1 then nc:=13 else nc:=2;
textbackground(nc);
window(20,7,50,7);
clrscr;
write(' ‡Ђ„ЂЌ€… -1');
if n=2 then nc:=13 else nc:=2;
textbackground(nc);
window(20,9,50,9);
clrscr;
write(' ‡Ђ„ЂЌ€… -2 ');
if n=3 then nc:=13 else nc:=2;
textbackground(nc);
window(20,11,50,11);
clrscr;
write(' ‡Ђ„ЂЌ€… -3');
if n=4 then nc:=13 else nc:=2;
textbackground(nc);
window(20,13,50,13);
clrscr;
write(' ‡Ђ„ЂЌ€… -4');
if n=5 then nc:=13 else nc:=2;
textbackground(nc);
window(20,15,50,15);
clrscr;
write(' ‚›•Ћ„');
end;

begin
nc:=1;
w(1);
while true do
begin
ch:=#1;
while(ch<>#13 )and(ch<>#0) do
ch:=readkey;
if ch=#0 then
ch:=readkey;
case ch of
#72: nc:=nc-1;
#80: nc:=nc+1;
#13: case nc of
1:begin
TextMode(co80);TextBackGround(0);ClrScr;
ClrScr;
min1:=0;min2:=0;max:=0;
TextColor(15);
Writeln('‚ўҐ¤ЁвҐ н«Ґ¬Ґ­вл ¬ ббЁў  X ');
i:=0; For i:=1 to 10 Do begin
Write('x[',i,']= ');Read(x[i]);
end;
Writeln;Readln;ClrScr;
Writeln('‚ўҐ¤ЁвҐ н«Ґ¬Ґ­вл ¬ ббЁў  Z ');
j:=0; For j:=1 to 5 Do begin
Write('z[',j,']= ');Readln(z[j]);
end;
Minimum(z,x,5,10,sinus,min1);
Minimum(z,x,5,10,tg,min2);
Maxsimum(x,z,10,5,cosinus,max);
Readln;TextColor(10);ClrScr;
Writeln('min(z[j]*sin[x(i)])= ',min1:5:3);
Writeln('min(z[j]*tg[x(i)])= ',min2:5:3);
Writeln('max(x[j]*cos[z(i)])= ',min1:5:3);
Readln;TextColor(14);
If min2<>0 then begin
Writeln(' (min(z[j]*sin[x(i)])+max(x[i]*cos[z(j)])');
Writeln('Y = ----------------------------------------- = ',(min1+max)/min2:5:3);
Writeln(' min(z[j]*tg[x(i)])');
end else Writeln('ЌҐўҐа­лҐ Ёб室­лҐ ¤ ­­лҐ');Readln;
end;
2:begin
TextMode(co80);TextBackGround(0);ClrScr;
ni:=ki;
While (ni=ki) or (ni>ki) Do begin
ClrScr;

TextColor(11);Write('‚ў-⥠X ­ з.:');TextColor(14);Read(ni);
TextColor(11);Write('‚ў-⥠X Є®­.:');TextColor(14);Read(ki);
end;shag:=10;
While (shag>1) or (shag<0.001) Do begin
TextColor(11);Write('‚ўҐ¤ЁвҐ и Ј :');TextColor(14);Readln(shag);
TextColor(10);
if (shag<=0.001) and (shag>=1) then Writeln(' Ј ¤®«¦Ґ­ «Ґ¦ вм ў Ё­вҐаў «Ґ ®в 0.001 ¤® 1');
Readln;
kol:=round((ki-ni)/shag);
Writeln('Ѓг¤Ґв Їа®ўҐаҐ­­® ',kol,' ЁЄб®ў');
Kruto(ni,shag,kol,super_good,a,num);
For i:=1 to num Do begin
TextColor(11);Write('x[',i,']= ');TextColor(14);
write(a[i]:3:2,' ');
end;
Kruto1(a,num);
readln;
end;
3: begin
TextMode(co80);TextBackGround(0);ClrScr;
f[1]:=1;
f[2]:=2;
For i:=3 to 20 Do
f[i]:=f[i-1]+f[i-2];
Write('‚ўҐ¤ЁвҐ зЁб«® M :');Readln(m);
Write('‚ўҐ¤ЁвҐ зЁб«® R :');Readln(r);
Proc(f,20,m,r);Readln;
end;
4:begin
TextMode(80);TextBackGround(0);ClrScr;
Writeln;k:=1;
Write('‚ўҐ¤ЁвҐ а §¬Ґа­®бвм ¬ ваЁжл ');
Readln(n,m_1);
Writeln('‚ўҐ¤ЁвҐ н«Ґ¬ҐҐ­вл ў ¬ ббЁў:');
For i:=1 to n Do begin
For j:=1 to m_1 Do begin
GotoXY(k,i+3);
Readln(d[i,j]);
k:=k+10;
end;
k:=1;
end;
Super1;
if c=1 then Writeln('‚ ¬ ббЁўҐ ®Ў­ а㦥­­л ўҐй. зЁб« ')
else Writeln('‚ ¬ ббЁўҐ ­Ґ ®Ў­ а㦥­­л ўҐй. зЁб« ');
If c=0 then
For i:=1 to n Do
For j:=1 to m_1 Do
d1[i,j]:=round(d[i,j]);
if c=1 then Super(d,c,n,m_1)
else Super(d1,c,n,m_1);
Readln;
end;
5:begin exit;end;
end;
end;
if nc=0 then nc:=5;
if nc=6 then nc:=1;
w(nc);
end;
end.
Соседние файлы в папке Alex