function rnum = reverse(num) rnum=0; while(num>0) m= mod(num,10); rnum = rnum * 10 + m; num = num /10; end end
ans = Inf
function rev = reverse(num) rev=0; while(num>1) m= mod(num,10); rev = floor(rev * 10 + m); num = num /10; %-----display situation each turn disp(num); end end
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)