Question: 1. 15 marks] What is the main difference between a while loop and a do-while loop? Convert the following while loop into a do-while loop.
1. 15 marks] What is the main difference between a while loop and a do-while loop? Convert the following while loop into a do-while loop. int sum = 0; int number = input.nextInt (); while" (number! = 0) sum number; numberinput.nextInt ()
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
