#Mastery18 #TC1017

Nesting of conditional statements

Nesting of conditionales statements such as if´s, else´s or switch´s is a way to solve a problem using programming. As it´s name says is just nesting conditionals Here goes an image where you can see how it has to look like the nest of conditionals. Depending on which conditional you use it will be the way you have to use them. Remember that nesting conditional statements it´s used for making decisions while the programm is running and it´s required the well syntax. 

The conventions of programming are required and remember that every line that will “depend” from another has to be a little bit written to the right as you can see in the example code. Example:

if (The blog == Blog)

    cout << “Correct” << endl;

else 

      if (The blog != Blog)

          cout << “incorrect” << endl; 

CC BY 4.0 #Mastery18 #TC1017 by Pablo Guerra is licensed under a Creative Commons Attribution 4.0 International License.

Comments are closed.