Smallest number whose square has N digits | Function to return smallest number whose square has N digits ; Calculate N - th term of the series ; Driver Code
function smallestNum ( N ) { x = Math . pow ( 10.0 , ( N - 1 ) / 2.0 ) ; return Math . ceil ( x ) ; } let N = 4 ; document . write ( smallestNum ( N ) ) ;