Count of N | C ++ implementation of the approach ; Function to return the count of N - digit palindrome numbers ; Driver code
#include <bits/stdc++.h> NEW_LINE using namespace std ; int nDigitPalindromes ( int n ) { return ( 9 * pow ( 10 , ( n - 1 ) / 2 ) ) ; } int main ( ) { int n = 2 ; cout << nDigitPalindromes ( n ) ; return 0 ; }