While Loops Indefinite Iteration. Last lesson we looked at definite loops using the ‘For’...
-
Upload
hector-watkins -
Category
Documents
-
view
213 -
download
0
Transcript of While Loops Indefinite Iteration. Last lesson we looked at definite loops using the ‘For’...
Indefinite Iteration
While LoopsIndefinite IterationLast lesson we looked at definite loops using the For statement.The while loop keeps going while some condition is TRUELets look at the coding on the next slide.A program which asks the user whether to display hello world or not and thus displaying how many times the user said yes
Void main (){char answerint count = 0, index = 1;answer=y; while(answer==y){ cout