Probability that a N digit number is palindrome | Find the probability that a n digit number is palindrome ; Denominator ; Assign 10 ^ ( floor ( n / 2 ) ) to denominator ; Display the answer ; Driver code
function solve ( n ) { let n_2 = parseInt ( n / 2 , 10 ) ; let den ; den = " " ; while ( n_2 -- > 0 ) den += ' ' ; document . write ( 1 + " " + den + " " ) ; } let N = 5 ; solve ( N ) ;