// for: determining when a known number of cycles or when the number of cycles employed for relatively simple
// while: I do not know the number of cycles, but know cycling conditions using a while loop
// // format while while (condition) {} block
/ / while process 1 // first determination condition is satisfied, if not satisfied, the loop is exited, if the execution condition is satisfied // block 2, step 1 and begin
// format: do {code block} while (condition)
// execution flow : go code block is executed, the determination condition again, if the condition is satisfied again code block is executed, if the condition is not satisfied
// out of the loop, performed at least once
do-while loop and while
Guess you like
Origin www.cnblogs.com/baixuezhemei/p/11596411.html
Ranking