D
D
dandropov952018-10-06 18:16:58
C++ / C#
dandropov95, 2018-10-06 18:16:58

How can you find the number of zeros in a number?

For example, there is a 1000000number
How to find out how many zeros are in a given number?
Only numbers of the form 10 to the power of "number of zeros" are of interest.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Moseychuk, 2018-10-06
@dandropov95

Calculate log base 10.
10^x = a
x = log10(a)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question