Find a distinct pair ( x , y ) in given range such that x divides y | Function to return the possible pair ; ans1 , ans2 store value of x and y respectively ; Driver Code
function findpair ( l , r ) { let ans1 = l ; let ans2 = 2 * l ; document . write ( ans1 + " " + ans2 ) ; } let l = 1 , r = 10 ; findpair ( l , r ) ;