uses crt;
var
a:array [1..9] of integer;
i,c,m,n:integer;
b:real;
begin
clrscr;
randomize();
c:=1;
for i:=1 to 9 do
begin
if i=c then
begin
a[i]:=i+3;
c:=c+3;
end
else
begin
if i mod 3=0 then a[i]:=a[i-1]+a[i-2] else a[i]:=sqr(i-1);
end;
write(a[i],' ');
end;
readln();
end.
uses crt;
var x,y,s,i,j:integer;
a: array [1..15] of integer;
begin
clrscr;
randomize();
writeln('Vvedite chislo');
readln(x);
writeln('Ishodniy');
for i:=1 to 15 do
begin
a[i]:=random(100);
write(a[i],' ');
end;
writeln;
writeln;
writeln('Ispravlenniy');
for i:=1 to 15 do
begin
if a[i]+ibegin
a[i]:=(a[i]+i)*2;
s:=s+a[i];
textcolor(red);
write(a[i],' ');
end else
begin
textcolor(white);
a[i]:=(a[i]+i);
write(a[i],' ')
end;
end;
writeln;
textcolor(green);
writeln('Summa =',s);
readln;
end.