← All problemsSign in

Find that single digit

Manish loves solving mathematical problems. So, one day his professor gave him an interesting problem to solve. His professor gave him a number n and Manish need to do the following operation:- Find the sum of the digits of n. Let the sum be m. If m contains only one digit than stop! , else assign the value of m to n. Also not be a multiple of 9. If so then print 0. Manish is required to perfo

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start