Find M | Function to find the M - th number whosesum till one digit is N ; Driver Code
function findNumber ( n , m ) { var num = ( m - 1 ) * 9 + n ; return num ; } var n = 2 , m = 5 ; document . write ( findNumber ( n , m ) ) ;