program Lab1_1_9; Uses crt; var i,k,l:integer; x,h,fun,fun2:real; qw,qe,qr,s,st:real;
begin clrscr; writeln('------------------------------------------------------------------------'); writeln(' | | e=-2 | | e=-3 | | e=-4 | |'); writeln(' X | f1(x) | f2(x) | N | f2(x) | N | f2(x) | N |'); writeln('------------------------------------------------------------------------'); x:=-0.6; h:=0.05; qw:=0.01; qe:=0.001; qr:=0.0001; for i:=1 to 20 do begin fun:=abs( sqr(1-sqr(x))*ln( (1+x)/(1-x) )+2*sqr( 1+sqr(x) )*arctan(x)-4*x )/32; {ўлзЁб«пҐ¬ f1} write(x:8:2,' | ',fun:4:6); {ўлў®¤Ё¬ १г«мв в f1 ў в Ў«Ёжг} k:=0; st:=x*x*x*x; {®ЇаҐ¤Ґ«пҐ¬ б⥯Ґм зЁб«ЁвҐ«п} fun2:=0; l:=0; repeat st:=st*x; {ўлзЁб«пҐ¬ зЁб«ЁвҐ«м} s:=st/( (4*k+1)*(4*k+3)*(4*k+5) ); { 室Ё¬ § 票Ґ дгЄжЁЁ f2} inc(k); {㢥«ЁзЁў Ґ¬ k Ґ¤ЁЁжг} fun2:=fun2+s; {ўлў®¤ १г«мв в ў в Ў«Ёжг} if (abs(s)<qw)and(l=0) then begin {ўлў®¤Ё¬ нЄа Ґб«Ё в®з®бвм 0.01} write(' | ', fun2:9:6,' | ', k); l:=1; end; if (abs(s)<qe)and(l=1) then begin {ўлў®¤Ё¬ нЄа Ґб«Ё в®з®бвм 0.001} write(' | ',fun2:9:6, ' | ',k); l:=2; end; until (abs(s)<qr); {ўлў®¤Ё¬ нЄа Ґб«Ё в®з®бвм 0.0001} write(' | ', fun2:9:6, ' | ',k,' |'); x:=x+h; writeln; end; Writeln('------------------------------------------------------------------------'); readln; end.
Program Lab2_9; uses crt; var alf: string[26]; last, c, b, s, ss, s1, s2, s3: string; n, p, k, r, i: integer; v,g: set of char; fl: boolean; begin clrscr; {ўў®¤Ё¬ бва®Єг бЁ¬ў®«®ў} writeln('Vvedite ctroku simvolov'); readln(s); {г¤ «пҐ¬ з «млҐ Ё Є®ҐзлҐ Їа®ЎҐ«л} repeat if (copy(s,1,1)=' ') then delete(s, 1, 1); if (copy(s,length(s),1)=' ') then delete(s, length(s), 1); until (copy(s,1,1)<>' ') and (Copy(s,length(s),1)<>' ');
repeat {г¤ «пҐ¬ «ЁиЁҐ Їа®ЎҐ«л ¬Ґ¦¤г б«®ў ¬Ё} n := pos(' ', s); if (copy(s,n+1,1)=' ') then delete(s,n,1) {г¤ «пҐ¬ Їа®б¬®вҐҐ®Ґ 1-®Ґ б«®ў® ў бва®ЄҐ} else begin {б®ЎЁа Ґ¬ ў ss ўбҐ бЁ¬ў®«л Єа®¬Ґ бЁ¬ў®«®ў Ї®б«Ґ¤ҐЈ® б«®ў } ss:= ss + copy(s,1,n); delete(s,1,n); end; until (pos(' ',s)=0);
last := s; {ЁйҐ¬ б«®ў ®в«ЁзлҐ ®в Ї®б«Ґ¤ҐЈ®} s:='';
repeat n := pos(' ', ss); if (copy(ss, 1, n-1)<>last) then s := s + copy(ss, 1, n); {б®ЎЁа Ґ¬ ў s ўбҐ б«®ў Єа®¬Ґ Ї®б«Ґ¤ҐЈ®} delete(ss, 1, n); {г¤ «пҐ¬ Їа®б¬®в८Ґ б«®ў® ў бв®ЄҐ, зв®Ўл Їа®ўҐаЁвм б«Ґ¤.} until (ss='');