Opening the reading…
Opening the reading…
PROGRAMMING FUNDAMENTALS › JAVA FUNDAMENTALS
This is a scratch drill — your code runs, nothing is graded or recorded. No test cases, no expected output, no verdict.
TASK
Convert distanceKm from 12.75 to wholeKm with static_cast<int>, assign wholeKm to restoredKm, and print distanceKm, wholeKm, and restoredKm on separate lines as 12.75, 12, and 12.0.
OUTPUT
Sample12.75 12 12.0
What a finished answer prints, from the lesson. Nothing has run yet — press Run and this is replaced by your program’s own output.