hi C geniuses,
i have been writing the following program called 'Gustav numbers"
the prob is :
Gustav is just learning addition after learning about
numbers. So far he knows how to add two single digit numbers but
not any bigger number. Since it’s a new thing to him, he is having
fun with a little game he created himself: he makes numbers and sums
their values. As he can add single digit values only, he continues the
process until he reaches a single digit. For instance,
132 ) 1 + 2 + 3 ) 6
123456789 ) 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 ) 45 ) 4 + 5 ) 9
Write a program that will read a number and print its corresponding
Gustav Number.
i wrote a solve but it does not work efficiently. would u guys help me please?
i would appreciate it very much.