Transform the following while loop into an equivalent do loop (make sure it produces the same output).

Question:

Transform the following while loop into an equivalent do loop (make sure it produces the same output).

int num = 1;
while (num < 20)
{
num++;
System.out.println(num);
}

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  answer-question

Java Software Solutions

ISBN: 9789353063610

9th Edition

Authors: John Lewis, William Loftus

Question Posted: