Writing while and do..while statements

You can write while statements using the following format:

while (condition) {
    // statements
}

You can write do-while statements using the following format:

do {
    // statements
} while (condition);