.


- 7


1: end;

, , , .

, . , , . , - , - .

 

Program Problem2;

uses WinCrt;

var

a, b, i : integer;

{---------------------------------------------------------------------------------------}

Procedure to_square(n : integer);

label 1;

var

a, b, k : integer;

begin

a := 1; k := 1;

while a*a + 1 <= n do

begin

k := k + 1;

a := a + 1

end;

for a := 1 to k do

for b := 1 to a do

if a*a + b*b = n

then

begin

writeln(n, '=', a, '*', a, '+', b,'*', b); goto

1

end;

1: end;

{----------------------------------------------------------------------------------------}

begin

write(' '); readln(a);

write(' '); readln(b);

write(', ');

writeln(' ');

for i := a to b do to_square(i);

end.