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);
}
```


This code can be written using a do loop as follows:
```
int num = 1;
do
{
num++;
System.out.println(num);
}
while (num < 20);
```

Computer Science & Information Technology

You might also like to view...

A digital camera uses a(n) ____ card, because each photo its owner takes requires megabytes of storage, and the device has a high storage capacity and access speed.

A. Compact Flash B. Blu-ray C. MultiMedia D. expansion port

Computer Science & Information Technology

On a touch screen device, you can touch one time with your fingertip to select a slide

Indicate whether the statement is true or false

Computer Science & Information Technology

Briefly describe the best practice rules for firewall use.

What will be an ideal response?

Computer Science & Information Technology

A stack is a FIFO list.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology