Question: Simple Questions

Write the procedure "number (n)", which will display the number of digits in the given number,
e.g., n = 2648 returns 4

number := proc (n)

local sum; 

while (1/10)*n != 0 do 

sum = sum+1; 

print(sum)

end do 

end proc

Why this doesn't work?
 

Please Wait...