Скачиваний:
289
Добавлен:
04.03.2014
Размер:
4.09 Кб
Скачать
Program Elf;
Uses Crt,Super;
var nc:byte;
ch:char;

procedure sss(n:integer);
var nc:byte;
begin
textbackground(0);
clrscr;
Writeln;
GotoXY(25, 3);
TextColor(14);
write('Ћ ‘ Ќ Ћ ‚ Ќ Ћ … Њ … Ќ ћ');
if n=1 then nc:=12 else nc:=11;
textcolor(nc);GotoXY(20, 6);
write(' ‡Ђ„ЂЌ€… -1');
if n=2 then nc:=12 else nc:=11;
textcolor(nc);GotoXY(20, 8);
write(' ‡Ђ„ЂЌ€… -2 ');
if n=3 then nc:=12 else nc:=11;
textcolor(nc);GotoXY(20, 10);
write(' ‡Ђ„ЂЌ€… -3');
if n=4 then nc:=12 else nc:=11;
TextColor(nc);GotoXY(20, 12);
write(' ‡Ђ„ЂЌ€… -4');
if n=5 then nc:=12 else nc:=11;
TextColor(nc);GotoXY(20, 14);
write(' ‚›•Ћ„');
end;


begin
nc:=1;
sss(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
clrscr;
write('a = ');readln(a);
write('b = ');readln(b);
write('n = ');readln(n);
h:=(b-a)/n;
tab1(a,h,n,y);
j:=smpsn(n,h,y);
h1:=2*h; n1:=n div 2 ;
tab1(a,h1,n1,y1);
j1:=smpsn(n1,h1,y1);
delta:=abs(j-j1)/15;
tab1(a+h/2,h,n-1,y2);
p:=pram(h,n,y2);
writeln('===============================================================================');
writeln('j = ',j:2:3);
writeln('delta = ',delta:2:3);
writeln('p = ',p:2:3);
readln;
end;
2:
Begin
ClrScr;
Nachalo(a1,b1,n);h:=(b1-a1)/n;tab(h,a1,n,y);
sm:=simpson(n,h,y,s2);writeln('бЁ¬Їб®­:',sm);writeln('ЇаאַгЈ.',s2);h1:=2*h;
in1:=sm;in2:=simpson(n,h1,y,s2);
del:=abs(in1-in2)/15;
writeln('Ї®ЈаҐи­®бвм бЁ¬Їб®­ -',del:8:5);
TaskB;
Escape;
end;
3:
begin
clrscr;

writeln('‚ўҐ¤ЁвҐ Є®«-ў® Є­ЁЈ ў бЇЁбЄҐ:');
readln(n);
for i:=1 to n do
begin
writeln('‚ўҐ¤ЁвҐ ­ §ў ­ЁҐ ',i,' Є­ЁЈЁ');
readln(k[i].naz);
writeln('‚ўҐ¤ЁвҐ  ўв®а  ',i,' Є­ЁЈЁ');
readln(k[i].a);
end;
for i:=1 to n do
for z:=1 to n-i do
if (k[z].a)>(k[z+1].a) then
begin
w:=k[z].a;
k[z].a:=k[z+1].a;
k[z+1].a:=w;
end;
writeln('Ї®  «д ўЁвг:');
for i:=1 to n do
writeln(k[i].a);
for i:=1 to n do begin
if pos('pascal',k[i].naz)<>0 then
begin
v:=0;
writeln('Є­ЁЈ  Ї® Ї бЄ «о:',k[i].naz,' ,д ¬Ё«Ёп  ўв®а  - ',k[i].a,'');
v:=v+1;
end;
end;
if v=0 then writeln('Є­ЁЈ ® Ї бЄ «Ґ ў ¤ ­­®¬ бЇЁбЄҐ ­Ґв');
readln;


end;
4:
begin
ClrScr;
{ ‚ў®¤ Ёб室­ле ¤ ­­ле }
writeLn('ўўҐ¤ЁвҐ ¤«Ё­л бв®а®­ ваҐгЈ®«м­ЁЄ :');
readln(a,b,c);
if ((a+b)<c) or ((a+c)<b) or ((b+c)<a)
then writeln('ваҐгЈ®«м­ЁЄ  б¤ ­л¬Ё ¤«Ё­ ¬Ё бв®а®­ ­Ґ бгйҐбвўгҐв')
else if (a=b) and (a=c)
then writeln('ваҐгЈ®«м­ЁЄ б ¤ ­л¬Ё ¤«Ё­ ¬Ё бв®а®­ - а ў­®бв®а®­­Ё©')
else if (a=sqrt(sqr(b)+sqr(c))) or (b=sqrt(sqr(a)+sqr(c))) or (c=sqrt(sqr(a)+sqr(b)))
then writeln ('ваҐгЈ®«м­ЁЄ  б¤ ­л¬Ё ¤«Ё­ ¬Ё бв®а®­ Їаאַ㣮«м­л©')
else if (a=b) or (b=c) or (c=a)
then writeln ('ваҐгЈ®«м­ЁЄ  б¤ ­л¬Ё ¤«Ё­ ¬Ё бв®а®­ а ў­®ЎҐ¤аҐ­­л©')
else writeln ('ваҐгЈ®«м­ЁЄ Ё­®©');
Readln;

end;
5:begin exit;end;
end;
end;
if nc=0 then nc:=5;
if nc=6 then nc:=1;
sss(nc);
end;
end.
Соседние файлы в папке Alex