You need to write a loop that reads integers and adds them to a sum as long as they are positive. Once 0 or a negative value is read in your loop terminates. 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