The while statement in C has the same syntax and meaning as in Java:
while ( boolean expression ) one-statement or: while ( boolean expression ) { statement1; statement2; .... } |
The for statement in C has the same syntax and meaning as in Java:
for ( initialization; boolean expression; increment ) one-statement or: for ( initialization; boolean expression; increment ) { statement1; statement2; .... } |
The do-while statement in C has the same syntax and meaning as in Java:
do one-statement while ( boolean expression ) or: do { statement1; statement2; .... } while ( boolean expression ) |