Need a solution to a problem where we sum until we get a single digit


#1

I would like to get a number and add it’s digits until it becomes a single digit number, then I would like to display the answer.
For example,
The number is 2505, so we add 2+5+0+5 and it becomes 12, then 1+2 becomes 3 and we display 3.

We get the number from the user.

Please help me with this. Any help will be appreciated.

Thank you


#2

Hey @avinash.93,

Checkout this workflow :slight_smile:
Hope this helps :slight_smile:

NumberGame.xaml (14.8 KB)

Regards,
Rishabh.


#3

Hello Avinash,

I hope my NumbertoSingleDigit workflow will help you to solve your problem.

NumbertoSingleDigit.xaml (14.5 KB)

Regards,
Anchal Sarraf


#4

Thank you @Rishabh_Lakhera and @Anchal_Sarraf. It worked perfectly