 Hello everyone, I am Nawal Emul working as assistant professor in mechanical department Vulture Institute of Technology, Sholapur. So in this video we are going to see decision making statements, so the learning outcomes at the end of this session students will be able to create decision making statements in C++ program using different forms of if and if else statement. So first decision making statements, so C++ allows you to make a decision based on the result of the condition. If the statement is true, it goes inside the body of true and if the statement is false it escapes and it goes to the next statement. So these can be called as decision making statements or conditional statements. So we will see if statement first, the statement if the statement is true inside the parenthesis then it goes inside the if statement and the body is executed of the if. And if the statement is false the statement of the if is skipped and it prints the next statement. We will see the syntax of the if statement, so there is a you can think what is the syntax for if statement, you can pause the video for 10 seconds and think the syntax. So we will see the syntax for if statement, so if then followed by the text expression and then the parenthesis bracket and there are there are the statements of if statement. We will see how the if statement works, so this is a working for the if statement, if the text expression is true as shown in the figure A I have taken in text equal to 5 and if test is less than 10 it executes inside the if body and figure B shows if the text expression is false that is in text equal to 5 and if test is greater than 5 it skips the if body and goes to the next line that as shown in the figure number B. So here is the flowchart of if statement, so there is a start then followed by the expression and if the expression is true it goes inside the body of if statements and then you will get the output or the if expression is false then it skips the if statements and directly comes to the stop. So we see a small program on if statement, so write a program to print a positive number entered by the user using if statement. So I have used code blocks to write a program, so you can write ash include iostream using namespace standard, you can practice this in your Turbo C++ also, so I have taken a variable number and they have I have used cout insertion operator enter integer and that integer is stored in a number then I have taken a condition if, if number is greater than 0 it shows the output as you have entered a positive integer and displayed a number. If the number is less than 0 or if you have entered a negative integer it skips the if statements and come back to the second that is this statement is always executed then I have returned it return to 0. So we will see the output of this program, so in the first case the user was asking to enter a integer positive integer I have entered 8, so you got the output you entered a positive integer 8 this statement is always executed suppose if I enter a negative integer that is minus 8 this statement is always executed, so whatever the body of if that is your number is a positive integer it skips and it comes to the next statement. So we will see if else statement, the if else statement executes the code inside the body of if statement if the text expression is true and it skips the body of else and if you have second condition or if the text expression is false it goes inside the body of else statement and skips the body of if, so the syntax for if else statement. So I will give you 10 seconds to think on what is the syntax for if else statement, so pause the video and then write a syntax for if else statement, yes the syntax for if else statement will be if then a text expression then followed by the parenthesis bracket then else then followed by the parenthesis bracket, if the text expression is true it goes inside the first bracket or the if text expression is false it comes to the second else statement. So we will see the working of if else statement if the text expression is true you can see the bracket there it goes inside the if and it skips the else and then you will get the output. Figure B shows if the text expression is false it skips the if body and then directly prints the else body and then you can you will get the output. Now we will see the flowchart of the if else statement, so start then followed by the expression here if the statement is true then it enters the if branch and then you will get the output but if the expression is false here it skips the if statement branch and it goes to the else branch and then your program stops and you will get the output. So this figure shows the flowchart of if else statement. So we will write the program to check an integer is positive or negative using if else statement. So the program is again written in the code blocks I have written ash include iostream using namespace standard int main then I have taken a variable number cout enter an integer then I have stored that integer in number I have two conditions here if the number is greater than or equal to zero then your output should be you entered a positive number or the second condition is like else you enter a negative integer the user can enter both the numbers positive or negative. So if the user enters a positive integer it goes inside the body of if statements or it goes to the body of else statement but in the last I have taken the cout this line is always printed so this line is always printed if the board if the statement is true or false we will see the output of if else statement. So if I enter the positive integer three the output will be you entered a positive integer three and this line is always printed in the same way if I take a second output that enter an integer if I entered minus three you entered a negative integer minus three and the line is always executed. So I have taken the references from C++ Balak Guru Swamy. Thank you.