Using Loops: C# Programming
Using Loops: C# Programming
C# Programming
©Rob Miles
What we can do so far
• We know there are three flavours of loops
do – while – put the test at the end
while – put the test at the start
for – create and update a control variable
• We also know that we can continue
(go round again) and break (leave the
loop)
Chapter 6.2 : Loops 11-Oct-13 ©Rob Miles 2
Pick a Loop
• I want to ask a user for a film number and
reject values outside the range of 1-6
• What kind of loop?