Hello! This is mastery number 19. I just realized I actually enjoy doing the masteries because lately I have almost no time for creative writing (which is one of my favorite things to do at my free time). This mastery is about the use of “while” for loops. It is really not that hard.

The syntax of a while loop in c++ is:

while (condition) {

statements;

}

and now an actual example:

int x

while (x<5){

cout<<“The value is too low”<<endl;

}

So, translating the past example to english, what we are basically saying is:  while

CC BY 4.0 Loops with “while” by Mferflores is licensed under a Creative Commons Attribution 4.0 International License.