Find Nth positive number whose digital root is X | Function to find the N - th number with digital root as X ; Driver Code
function findAnswer ( X , N ) { return ( N - 1 ) * 9 + X ; } let X = 7 ; let N = 43 ; document . write ( findAnswer ( X , N ) ) ;