Thursday, May 10, 2018

If statements

Related image
In most programming languages there are statements called "If-statements" which, as shown in the above diagram, check to see if a statement comes out to be true or false. If the statement, such as "if (1==1){" will execute the code to the next brace. In C++, you have to remember that the "=" operator is the assignment operator which assigns the value of the object on the left to the variable on the right.

5 comments: