Discuss a situation in which it would be more appropriate to use a do…while statement than a while statement. Explain why.

What will be an ideal response?


A do…while statement executes its body zero or more times, so if you want to guarantee that the loop body executes at least once, you’d choose a do…while statement over a while statement.

Computer Science & Information Technology

You might also like to view...

What is the origin and structure of the Internet?  Include some of the services it provides and the protocols they use.

What will be an ideal response?

Computer Science & Information Technology

How much storage does a dynamic disk require for the disk management database?

A. 1 MB B. 10 GB C. 5 MB D. 50 MB

Computer Science & Information Technology

In a table, the intersection of a column and row is called a compartment

Indicate whether the statement is true or false

Computer Science & Information Technology

The advantage of participating in ________ e-commerce is that it enables consumers to interact with one another through auctions and other sites providing goods and services

Fill in the blank(s) with correct word

Computer Science & Information Technology