Find a N | Function that print the answer ; if n == 1 then it is not possible ; loop to n - 1 times ; print 4 as last digit of the number ; Driver code ; Function call
function findTheNumber ( n ) { if ( n == 1 ) { document . write ( " " ) ; return ; } for ( var i = 0 ; i < n - 1 ; i ++ ) { document . write ( " " ) ; } document . write ( " " ) ; } var n = 12 ; findTheNumber ( n ) ;