i need help here is problem
The positive integer number N is given. We subtract from this number the sum of its digits. From the received number we soon subtract the sum of its digits and so on. This operation continues until the number is positive. How many times this operation will be repeated?
and here is my code what is wrong here?
The positive integer number N is given.
...explanation of operation
This operation continues until the number is positive.
Erm...it's already positive, so none? If you did it with a negative number it would never become positive it would keep getting smaller. I think you've made an error in describing what you want.