Function to print the smallest and largest palindrome with N digits
static void printPalindrome ( int n ) { if ( n == 1 ) { Console . WriteLine ( " Smallest ▁ Palindrome : ▁ 0" ) ; Console . WriteLine ( " Largest ▁ Palindrome : ▁ 9" ) ; } else { Console . WriteLine ( " Smallest ▁ Palindrome : ▁ " + ( int ) ( Math . Pow ( 10 , n - 1 ) ) + 1 ) ; Console . WriteLine ( " Largest ▁ Palindrome : ▁ " + ( ( int ) ( Math . Pow ( 10 , n ) ) - 1 ) ) ; } }