text: Count of N digit Numbers whose sum of every K consecutive digits is equal | Set 2 | Function to count the number of N - digit numbers such that sum of every K consecutive digits are equal ; Print the answer ; Driver Code
code: function count ( n , k ) { let count = Math . pow ( 10 , k ) - Math . pow ( 10 , k - 1 ) ; document . write ( count ) ; } let n = 2 , k = 1 ; count ( n , k ) ;