While/ Until Loops

Olivia

Verified seller
Staff member
Verified Trusted Seller
Nov 13, 2018
1,249
425
113
russiancarders.se
#1
Another elem entary program m ing concept is the while control structure, which is a type of loop. A program m er will often want to execute a set of instructions m ore than once. A program can accom plish this task through looping, but it requires a set of conditions that tells it when to stop looping, lest it continue into infinity. A while loop says to execute the following set of instructions in a loop while a condition is true. A sim ple program for a hungry m ouse could look som ething like this: While (you are hungry) { Find some food; Eat the food; }
 

Log in

Online statistics

Members online
0
Guests online
43
Total visitors
43