Logarithm tricks for Competitive Programming | C # implementation count the number of digits in a number ; Function to count the number of digits in a number ; Driver Code
using System ; class GFG { static int countDigit ( double n ) { return ( ( int ) Math . Floor ( Math . Log10 ( n ) + 1 ) ) ; } public static void Main ( ) { double N = 80 ; Console . Write ( countDigit ( N ) ) ; } }