diff --git a/guide/english/cplusplus/while-loop/index.md b/guide/english/cplusplus/while-loop/index.md index 6ed882fa4e..16be2c57ef 100644 --- a/guide/english/cplusplus/while-loop/index.md +++ b/guide/english/cplusplus/while-loop/index.md @@ -5,9 +5,11 @@ title: While-loop A while loop statement repeatedly executes a target statement as long as a given condition is true. Syntax: +```C++ while(condition) { statement(s); } +``` A key point of the while loop is that the loop might not ever run. When the condition is tested and the result is false, the loop body will be skipped and the first statement after the while loop will be executed. @@ -49,5 +51,5 @@ value of a: 19 ``` -###Sources -www.tutorialspoint.com +### Sources +- www.tutorialspoint.com