//прога на Pascal`e
var
x: real;
function f (a:real):real;
begin
if a<=0 then f:=sqr(a) else f:=a/10;
end;
begin
write ('Введите x: ');
readln (x);
write ('f(', x, ') = ', f(x) );
end.
//правильно вот так:
Program al;
var c: real;
begin
c:=4.75;
writeln('c=',c);
end.
Const
N = 10;
Var
C:array[1..N] of integer;
i,k,Max:integer;
P:real;
Begin
Randomize;
P:=1;
k:=0;
Max:=1;
WriteLn('C(',N,') в столбик:');
For i:= 1 to N do
Begin
C[i]:=random(31)-15;
WriteLn(C[i]:4);
if i mod 2 = 0 then P:=P*C[i];
if C[i] > 0 then k:=k+1;
if Abs(C[i]) > Abs(C[Max]) then Max:=i;
End;
Write('C(',N,') в строку:');
For i:= 1 to N do
Write(C[i]:4);
WriteLn;
WriteLn('P = ',P);
WriteLn('k = ',k);
WriteLn('Max = ',C[Max],'[',Max,']');
ReadLn;
End.