Skip to content

Latest commit

 

History

History
15 lines (10 loc) · 318 Bytes

lucky_number.md

File metadata and controls

15 lines (10 loc) · 318 Bytes

Write a program to find the lucky number from given mobile numer lucky number means reduce the sum of digits to single digit(0 between 9)

Sample input:

mobile = "9848022338"

Sample output:

Lucky number is 2 

Explanation: 9+8+4+0+2+2+3+3+8 = 47 -> 11 -> 2 (lucky number 2)