im just new to it all, ive created a loop that divides an integer by 10 until it gets past the decimal point e.g. if i supply 123 it would loop until it got 0.123 i just need to work out how to count the number of loops it took to get the integer past the decimal point?
Help Please! :)
Im trying to create a program that outputs the number of digits in a given integer e.g if i input 4392 it would output 4 or if i input 2499238 it would output 7 how can i do this with a loop?
Thanks
Superblades
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.