Computer Science Canada Digits |
Author: | creature_lm_ [ Wed Jan 05, 2005 7:43 pm ] |
Post subject: | Digits |
Hi Guys!!! I dont know how to show the significant digits in Turing. If i input 1000 the comp should show 1 digit but how???? PLease!!! Lena. |
Author: | Tony [ Wed Jan 05, 2005 9:32 pm ] |
Post subject: | |
convert the number to string (intstr()), cut off all the extra 0s off the end of it (str_variable(*) returns the last character; str_variable(1..*-1) returns everything but the last character). when you're done cutting, just count the remaining length (length(str_variable)) |