186k views
5 votes
Use the ____ statement to execute one set of instructions if the condition is true, and another set of instructions if the condition is false.

1 Answer

4 votes

Answer:

The answer is "if-else conditional statement".

Step-by-step explanation:

In the programming language to check any condition, we use conditional statements. There are several types of conditional statement but in this question, we use if-else conditional statements.

Syntax:

//define variable A,B and assign a value that is 10,12.

If(A>B)

{

//when the value of A is greater then value B this statement will execute.

}

else

{

//print B variable value

}

This statement executes in both terms. if the condition is true so if the block is executed otherwise else part is executed. In other words, we can say that the if block is used for true condition and else is used for false condition.

User Musen
by
3.3k points