Write a program that reads an integer and prints how many digits the number has, by checking whether the number is 10, 100, and so on. (Assume that all integers are less than ten billion.) If the number is negative, first multiply it with —1.

This website uses cookies so that we can provide you with the best user experience. By continuing to use this website you are giving consent to cookies being used.