13 day
Today we will continue learning Deision making
2. if-else in C
The if statement alone tells us that if a condition is true it will execute a block of statements and if the condition is false it won’t. But what if we want to do something else when the condition is false? Here comes the C else statement. We can use the else statement with the if statement to execute a block of code when the condition is false. The if-else statement consists of two blocks, one for false expression and one for true expression.
https://www.youtube.com/watch?v=ZhDOgxo0JPU&list=PLfgCIULRQavzxY-IO2sO5Vj5x7C_tjW3R&index=11
Comments
Post a Comment