You need to write a loop that will keep reading and adding integers to a sum, until the sum reaches or exceeds 21. The numbers are all less than 20 and the sum is initially 0. Which is the preferred loop construct to use?
.
.
Click on the title for the solution
.
.
while loop
do while loop
for loop
.
Click on the title for the solution
.
.
This is the answer:
:
while loop
do while loop
for loop
Comments
Post a Comment