.


? - 2


. 20):

. 20

while ... do ... .

1. n.

.

4538. 4538 10 (mod):

4538 mod 10 = 8, ( ).

: "1 - 8".

4538 10, 453 ( ):

4538 div 10 = 453.

:

2 - ; 453 mod 10 = 3

2 - 3,

453 div 10 = 45,

3 - ; 45 mod 10 = 5,

3 - 5,

45 div 10 = 4,

4 - ; 4 mod 10 = 4,

4 - 4,

4 div 10 = 0.

!

n . .

. . 1.


Program

Problem1; {. .}

uses WinCrt;

var

n, p, i : integer;

begin

write(' n <= 32767 '); readln(n);

i := 1;

while n <> 0 do

begin

p := n mod 10;

writeln(i, ' - ', p);

n := n div 10;

i := i + 1

end

end.

.

n , p - , i - .

write . readln n.

i 1.

while ( n 0), .

,

begin ... end.

:

p := n mod 10; - ;

writeln(i,' - ', p); - ;

n := n div

10; - "" ;

i := i + 1; - 1.