1
const
n = 100;
var
a: array[1..n] of word;
i, m: byte;
sum: word;
begin
write('Kol-vo chisel: ');
readln(m);
sum:=0;
for i:=1 to m do
begin
a[i] := i;
write(a[i]:4);
sum:=sum + sqr(a[i])*a[i];
end;
writeln;
writeln('Sum = ', sum:4);
readln;
end.
2
const
n = 100;
var
a: array[1..n] of word;
i, dn: byte;
km: real;
begin
write('Kol-vo dney: ');
readln(dn);
km:=7;
for i:=2 to dn do
km:=km+(km+1.5);
writeln;
writeln('Turisty proshli ', km:4:1, ' km');
readln;
end.