Program vosem(input,output);
Type row=array[1..100] of real;
Var Num,I,NumbMax, NumbRMax, NumbVMax: integer;
MaxTemp,rmax,vmax; real;
Temp,r,v:row;
procedur FindMax (t: row; Num: integer;-
var Max:real;var Imax: integer);
var I:integer;
begin
Max:=T[1];
Imax:=1;
for I:=2 to Num do
if T>Max then
begin
Max:=T; Imax:=I
end
end;
begin
writeln('vvedite 4islo elementov');
readln(Num);
writeln('vvedite massiv zna4enij');
for I:=1 to Num do read (Temp);
r:=Temp*Temp;
Temp:=r;
FindMax (Temp,Num, MaxTemp, NumbMax);
Rmax:= MaxTemp;
NumbRMax:= NumbMax;
V:=(Temp-rmax)/Num;
Temp:=V;
FindMax (Temp,Num, MaxTemp, NumbMax);
Vmax:= MaxTemp;
NumbVMax:= NumbMax;
Writeln('Maximum', Rmax:4:1, 'Nomer=', NumbRMax:2);
Writeln('Maximum', Vmax:4:1, 'Nomer=', NumbVMax:2);
end.
Procedur
Type
Row= array[1..dim];
Qmatrix= array[1..dim,1..dim];
procedur NewMax(T:Qmatrix;dim:integer:-var Max:real; I,J:integer);
begin
Max:=T[1,1];
For I:=2 to dim do
for For J:=1 to dim do
If T[I,J]>Max then
Begin
Max:=T[I,J];
End;
T[I,I]:=Max;
End.
Program second (input,output);
var x,y,c:real;
label 1, 2, 3;
begin
writeln('vvedite x,y');
readln(x,y);
if (x=o) then
goto 1;
else
if (y=0) then
goto 1;
else
if (x>0) then
begin
if (y>0) then
goto 1;
else z:=y-x;
if (z<0) then
begin
c:=y/x
if (c=>-1) then
goto 1;
else goto 2;
end;
if (y<0) then
goto 1;
end;
else z:=y-x
if (z>0) then
begin c:=y/x;
if (c=>-1) then
goto 2;
else goto1;
end;
1:
writeln ('da')
goto 3;
2:
writeln ('net')
goto 3;
3:
end.
Program first (input,output);
var x,y,b,a,e,c,F,z:real;
label 1, 2;
begin
writeln('vvedite x,y,a,b. Prichem a I b ne ravnye 0');
readln(x,y,a,b);
if (a=0) then
goto 2;
else
z=y+(x-a)*(x-a);
if (z=o) then
goto 1;
else
c:=(x-a)*(x-a)*(x-a);
e:=exp(-(x/a)*(x/a)-(x/b)*(x/b));
F:=c/z*e;
Writeln('F=', F);
Goto 3;
1:
writeln('Proizoshlo delenie na 0. Izmenite znachenija x,y,a');
goto 3;
2:
writeln('Proizoshlo delenie na 0. Izmenite znachenija a,b');
goto 3;
3:
end.
Program third (input,output);
var x,a,b,h:real;
begin
writeln('vvedite x,a,b,h');
readln(x,a,b,h);
writeln(' x y');
writeln;
while x<(b +h/2) do
begin
If (x<0,5) then
Begin
Y:=1+sin(x+0,5)*sin(x+0,5)*sin(x+0,5);
End
Else
If (-0,5=<x) and (x=<0,5) then
Begin
Y:=1;
End
Else
If (0,5<x) then
Begin
Y:=1+sin(x-0,5)*sin(x-0,5)*sin(x-0,5);
End;
Writeln(x:5:2, y:10:4);
X:=x+h;
End;
Writeln('konec tablitsy');
End.
Program four(input,output);
Const N=10;
Var x,a,S:real;
I:integer;
Begin
Writln('vvedite x');
Readline(x);
A:= sin((I+1)*x)*i/((I+1)*(I+1)*sin(I*x));
S:=a;
For k:=2 to N do
Begin
A;=a+sin(2*x)/(4*sin(I*x));
S:=S+a;
End;
Writeln('Summa',N:2,'slagaemyx',S:7:4)
End.
Program five(input,output);
Var x,a,eps,y,S:real;
K:integer;
Begin
Writln('vvedite x, eps');
Readln(x,eps);
K:=0;
A:=1;
S:=0;
Repeat S:=S+a;
K:=k+1;
A:=a+((-1)*(2*k+3)cos((2*k+3)*x)/((2k+3)*cos((2*k+1)*x));
Until abs(a/y)<eps;
Writeln('S(',x:4:2,')=',S)
End.
Zigzy Имеет
Паладин+ Учла, спасибо.