clc;clear all;

Number=input('enter a number');
hold=Number;
k=1;
while Number>9
    array(k)=mod(Number,10);
    k=k+1;
    Number=floor(Number/10);
end
Number
array(k)=Number;
disp(hold)
disp(array)
k=0;
tot=0;
for i=length(array):-1:1
    tot=tot+array(i)*10^k
    k=k+1;
end
disp(tot)