Display and find the sum of the series [1+11+111+1111+11111+…..]

Display and find the sum of the series [1+11+111+1111+11111+…..]

Input:

Enter the range:

Output:
The sum of numbers in the series upto range 3 is 123

Implementation: