Driver Code
public static void main ( String [ ] args ) { int n = 13 ; System . out . println ( countDigitOne ( n ) ) ; n = 131 ; System . out . println ( countDigitOne ( n ) ) ; n = 159 ; System . out . println ( countDigitOne ( n ) ) ; } }