Recursive C ++ program to count number of digits in a number
#include <bits/stdc++.h> NEW_LINE using namespace std ; int countDigit ( long long n ) { if ( n / 10 == 0 ) return 1 ; return 1 + countDigit ( n / 10 ) ; }