Digits
Author |
Message |
creature_lm_
|
Posted: 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. |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Tony
|
Posted: Wed Jan 05, 2005 9:32 pm Post subject: (No 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)) |
|
|
|
|
|
|
|