- 1
(Armstrong NumberIs) any improvements wants to make this code better?
1 Answer
+ 1
No need but if you want, another simply:
x=number/100;
y=number/10%10;
z=number%10;
It's same like :
x=number /100 %10;
y=number /10 %10;
z=number /1 %10;
edit:
also if you use loop, you can work with only 2 variables.. no need y, z additionally..
Hope it helps...