You are on page 1of 4

N=5535.

984;
M=N;
kol1=0;
while round(M/10)>0
kol1=kol1+1;
M=round(M/10);
end
kol1
G=N;
M=N;
kol2=0;
G
while (G-round(G))!=0
kol2=kol2+1;
G=G*10;
end
kol2
M=floor(N);
while(kol1)>0
J=floor(M/(10^(kol1-1)))*(10^(kol1-1))
J
kol1=kol1-1
M=M-J;
end

function O=O(N)
N=535.9865;
M=N;
kol1=0;
while round(M/10)>0
kol1=kol1+1;
M=round(M/10);
end
kol1
G=N;
M=N;
kol2=0;
G
while (G-round(G))!=0
kol2=kol2+1;
G=G*10;
end
kol2
M=floor(N);
while(kol1)>0
J=fix(M/(10^(kol1-1)))*(10^(kol1-1))
kol1=kol1-1

M=M-J;
end
M=N-floor(N)
for i=1:(kol2-1)
K=floor(M*10^i)/(10^i)
M=M-K
end

function O()
N=53895.1234;
M=N;
kol1=0;
while round(M/10)>0
kol1=kol1+1;
M=round(M/10);
end
kol1
G=N;
M=N;
kol2=0;
G
while (G-round(G))!=0
kol2=kol2+1;
G=G*10;
end
kol2
M=floor(N);
while(kol1)>0
J=fix(M/(10^(kol1-1)))*(10^(kol1-1))
kol1=kol1-1

M=M-J;
end
M=N-floor(N)
for i=1:(kol2-1)
K=floor(M*10^i)/(10^i)
M=M-K
end
endfunction

Program zadacha_6;
Uses crt; {* *}
Var {* *}
n : integer; { }

d : integer; {}
s : integer; { }
i : integer; { }
Begin
clrscr; {* *}
writeln (' ');
readln (n);
For i := 2 To n - 1 Do {* i => [2 .. n] *}
s := 1;
For d := 2 To i - 1 Do {* d 2 i *}
Begin
If i Mod d = 0 Then
Begin
s := s + d;
d := d + 1;
End;
If s = i Then
Begin
writeln (i, '');
End;
End;
End.

You might also like