Count ' d ' digit positive integers with 0 as a digit | Returns count of ' d ' digit integers have 0 as a digit ; Driver Code
function findCount ( d ) { return 9 * ( ( Math . pow ( 10 , d - 1 ) ) - ( Math . pow ( 9 , d - 1 ) ) ) ; } let d = 1 ; document . write ( findCount ( d ) + " " ) ; d = 2 ; document . write ( findCount ( d ) + " " ) ; d = 4 ; document . write ( findCount ( d ) + " " ) ;