.


- 5


: 52 = 25; 252 = 625.

 

 

Procedura awtomorf(x : integer);

var

d, k : integer;

begin

d := 10;

while d <= x do d := d*10;

k := x mod 10;

if (k = 1) or (k = 5) or (k = 6)

then

if x*x mod d = x then

writeln(x, ' ', x*x)

end;

15. , , , :

Procedure 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;

16. [n; m].

Procedure pifagor(n, m : integer);

var

a, b, c : integer;

begin

writeln(' [',n, ';', m,']');

for a := n to m do

for b := n to a do

for c := n to m do

if a*a + b*b = c*c then writeln(a, ' ', b, ' ', c)

end;

17. n .

Procedure sum_number_cube(n : integer; var p : integer);

var

i, j, k : integer;

begin

k := 0; i := 1;

while i*i*i + 1 <= n do

begin

k := k + 1; i := i + 1

end;

p := 0;

for i := k downto 1 do

for j := 1 to i do

if i*i*i + j*j*j = n

then

begin

p := p + 1;




- -  - -  - -