Math, asked by simrankumar2758, 11 months ago

Given an integer n, return simplified version of n, simplified version means adding all the individual digits of all the n to form another number n and repeat this task to get a final single digit number which will be our answer.

Answers

Answered by amitnrw
0

Answer:

Step-by-step explanation:

1.  Input Number

2. Check number of Digit

3. Sum of Digits = 0

4.  if Number of Digit  >  1

5. Then Find the Each Digit

6. Sum of Digits = Sum of Digits + Each Digit

7 if (Sum of Digit > 1 )

8 . Repeat 5 & 6

9   Else Print Sum of Digits

10 Else Print - Number

Similar questions