<em>VAR</em>
<em> ans: Real;</em>
<em> n, i: Integer;</em>
<em>BEGIN </em>
<em> Read(n);</em>
<em> </em>
<em> For i := 1 to n do </em>
<em> ans := ans + (1 / Sqr(i));</em>
<em> </em>
<em> Write(ans);</em>
<em>END.</em>
Var z1,z2:byte;
begin
for z1:=1 to 9 do begin
for z2:=0 to 9-z1 do begin
writeln(z1,z2,z1+z2);
end;
end;
end.
По просьбе автора задачи - вариант с 3 циклами
var x,y,z:byte;
begin
for x:=1 to 9 do begin
for y:=0 to 9 do begin
for z:=0 to 9 do begin
if (x+y=z) then writeln(x,y,z);
end;
end;
end;
end.
Переводим 260 в двоичную систему счисления и видим:
Var a:array[1..15]of integer;
i,max:integer;
Begin
for i:= 1 to 15 do
a[i]:=random(100);
max:= a[1]+a[2];
for i:= 1 to 14 do
if max < a[i]+a[i+1] then
max := a[i]+a[i+1];
writeln(max);
End.