Something Interesting 09-08-2015, 02:18 AM
#1
This is a mathematical way to count how many characters there are in a given input which is an integer.
What this is doing is incrementing the starting counter of 1 each time by 1 that the power is able to be multiplied by 10, but still be lower than the input of the function.
Code:
Function intCount(ByVal input As Integer)
Dim count As Integer = 1
Dim power As Integer = 10
While power <= input
count += 1
power *= 10
End While
Return count
End Function
Sub Main()
Console.WriteLine(intCount(Console.ReadLine))
Console.ReadLine()
End SubWhat this is doing is incrementing the starting counter of 1 each time by 1 that the power is able to be multiplied by 10, but still be lower than the input of the function.
![[Image: GiXvY27.png]](http://i.imgur.com/GiXvY27.png)





![[+]](https://sinister.li/images/modern/collapse_collapsed.png)



















![[Image: tenor.gif]](https://media.tenor.com/images/40e171e6954998e4c640c1a106cd238c/tenor.gif)

