2
COMP102 Prog Fundamentals I: do-while Loops /Slide 2 The do-while Statement l Syntax do action while (condition) l How it works: n execute action n if condition is true then execute action again n repeat this process until condition evaluates to false. l action is either a single statement or a group of statements within braces. action true false condition