spaces and extra word (#21706)

Added spaces between sentences in first paragraph and removed an additional the in line 208
This commit is contained in:
katiepillar6
2018-11-10 21:25:37 -08:00
committed by Manish Giri
parent cfc7dd09ca
commit 640e1298b8

View File

@@ -4,7 +4,7 @@ title: Logical Operators and If Statements
# If Statements in C
The ability to change the behavior of a piece of code which is based on certain information in the environment is known as conditional code flow. Sometimes you want your code to run according to certain conditions. In such situation we can use If statements. It is also known as decision making statement as it makes the decision on the basis of given expression(or on given condition). If the expression evaluates to true, then the block of code inside the 'if' statement will be executed. If the expression evaluates to false, then the first set of code after the end of the 'if' statement (after the closing curly brace) will be executed. A expression is an expression that has relational and/or logical operators operating on boolean variables. A expression evaluates to either true or false.
The ability to change the behavior of a piece of code which is based on certain information in the environment is known as conditional code flow. Sometimes, you want your code to run according to certain conditions. In such situations we can use **If** statements. It is also known as a decision making statement, as it makes the decision on the basis of a given expression (or on a given condition). If the expression evaluates to true, then the block of code inside the 'if' statement will be executed. If the expression evaluates to false, then the first set of code after the end of the 'if' statement (after the closing curly brace) will be executed. An expression is something that has relational and/or logical operators operating on boolean variables. Expressions evaluate to either true or false.
## Syntax of *if statement*
```
@@ -206,7 +206,7 @@ int main() {
}
```
What will be the the Output? "NO! I am boss"? if you are guessing this output then you are wrong.
What will be the Output? "NO! I am boss"? if you are guessing this output then you are wrong.
Why did this happen? because in the if statement you used "=" instead of "==" operator.
"==" is comparator .