From 13709bf178054b27b32c116488666a91cf05d123 Mon Sep 17 00:00:00 2001 From: Samuele Bella <35852993+XGiurob94@users.noreply.github.com> Date: Sat, 6 Apr 2019 15:55:50 +0200 Subject: [PATCH] Update index.md (#28796) Added an Example where the while loop gets ignored. --- guide/english/cplusplus/while-loop/index.md | 24 ++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/guide/english/cplusplus/while-loop/index.md b/guide/english/cplusplus/while-loop/index.md index cf18f9eb93..2982890617 100644 --- a/guide/english/cplusplus/while-loop/index.md +++ b/guide/english/cplusplus/while-loop/index.md @@ -51,6 +51,28 @@ value of a: 18 value of a: 19 ``` +Example of Skipped Loop Body: +```C++ +#include +using namespace std; + +int main(){ + //Local variable declaration + int age=10; + + //while loop execution + while(age>21) { + cout<<"The citizen is an adult."<