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.