Count all possible N digit numbers that satisfy the given condition | C # implementation of above approach ; Function to return the count of required numbers ; If N is odd then return 0 ; Driver Code
using System ; class GFG { static string getCount ( int N ) { if ( N % 2 == 1 ) return "0" ; string result = "9" ; for ( int i = 1 ; i <= N / 2 - 1 ; i ++ ) result += "0" ; return result ; } public static void Main ( ) { int N = 4 ; Console . WriteLine ( getCount ( N ) ) ; } }