Computer Science, asked by pawankumar7126071260, 1 month ago

write syntax of 'if-else' statement​

Answers

Answered by kailashmannem
10

If else statement:-

  • In an if - else statement,

  • If the condition is true, then the statements in the if block will be executed, otherwise the statements in the else block will be executed.

Syntax:-

if < condition >

{

------------------

------------------

}

else

{

------------------

------------------

}

Answered by karthicksudha23
0

Answer:

If condition is True, the statements following Then are executed. If condition is False, each Else If (if any) is evaluated in turn. When a True condition is found, the statements following the associated Then are executed. Block If statements can be nested; that is, contained within one another.

example

if (condition) then

statement 1

else

statement 2

Explanation:

Similar questions