Opening the reading…
Opening the reading…
DSA FUNDAMENTALS › CONTROL FLOW
This is a scratch drill — your code runs, nothing is graded or recorded. No test cases, no expected output, no verdict.
TASK
Complete the loop for n = 50724 so it preserves n, processes every digit through work, and prints the digit sum 18. Add the statement that advances work after each digit is added to sum.
OUTPUT
Sample18
What a finished answer prints, from the lesson. Nothing has run yet — press Run and this is replaced by your program’s own output.