Largest Even and Odd N | Function to print the largest n - digit even and odd numbers in octal number system ; Append '7' ( N - 1 ) times ; Append '6' for an even number ; Append '7' for an odd number ; Driver code
function findNumbers ( n ) { var ans = " " ; for ( var i = 0 ; i < n - 1 ; i ++ ) ans += ' ' ; var even = ans + ' ' ; var odd = ans + ' ' ; document . write ( " " + even + " " ) ; document . write ( " " + odd + " " ) ; } var n = 4 ; findNumbers ( n ) ;