Răspuns:
z=0;
p=1;
n=103456;
103456>0 (A)
c=6;
n=10345;
6%3==0 (A)
z=0+1(9-6)=3;
p=1*10=10;
10345>0 (A)
c=5;
n=1034;
5%3==0 (F)
1034>0 (A)
c=4;
n=103;
4%3==0(F)
103>0 (A)
c=3;
n=10;
3%3==0 (A)
z=3+10(9-3)=3+60=63;
p=10*10=100;
10>0 (A)
c=0;
n=1;
0%3==0 (A)
z= 63 + 100(9-0)=963;
p=100*10=1000;
1>0 (A)
c=1;
n=0;
1%3==0 (F)
0>0 (F)
z=963.