Playing with Digits in Java

Here you are given with an Integer, you need to display the count of non-repeated integers starting from 1 to till that number.




Input
7
Output: 7 as there are no repeated counts from 1 to 7.

similarly
Input : 100

Output: 10 (11,22,33,44,55,66,77,88,99,100 these are the repeated  digit counts from 1 to 100).

Comments

Popular posts from this blog

Reasoning-Number Series

Reasoning-Letter Series

Profit and Loss