Largest Even and Odd N | C # implementation of the approach ; Function to print the largest n - digit even and odd numbers ; Driver code
using System ; class GFG { static void findNumbers ( int n ) { int odd = ( int ) Math . Pow ( 10 , n ) - 1 ; int even = odd - 1 ; Console . WriteLine ( " Even ▁ = ▁ " + even ) ; Console . Write ( " Odd ▁ = ▁ " + odd ) ; } public static void Main ( ) { int n = 4 ; findNumbers ( n ) ; } }