45,858 views
42 votes
42 votes
I NEED THIS ASAP!!! I"LL GIVE 30 PTS.!!!

2 things are required to make a loop: a. ______________ b. _____________

User Pool Pro
by
2.5k points

1 Answer

13 votes
13 votes

Answer:

(not quite sure what the question is asking seems you need, but bare minimum is)

an initial value and an increment or decrement

a condition where the loop stops

Step-by-step explanation:

assuming you have the structure for the loop, depending on the language it could be a for, while or until command. You will always need the initial value for the variable your looping on, how it changes (increment or decrement) and then a condition when the looping in to stop.

e.g. say you want to add up the numbers from 1 to 10, inclusive

sum = 0

for I is 1 to 10 incremented by 1

sum=sum+I

end of loop

User Btrballin
by
3.0k points