Count ' d ' digit positive integers with 0 as a digit | C # program to find the count of positive integer of a given number of digits that contain atleast one zero . ; Returns count of ' d ' digit integers have 0 as a digit ; Driver Code
using System ; class GFG { static int findCount ( int d ) { return 9 * ( ( int ) ( Math . Pow ( 10 , d - 1 ) ) - ( int ) ( Math . Pow ( 9 , d - 1 ) ) ) ; } public static void Main ( ) { int d = 1 ; Console . WriteLine ( findCount ( d ) ) ; d = 2 ; Console . WriteLine ( findCount ( d ) ) ; d = 4 ; Console . WriteLine ( findCount ( d ) ) ; } }