Computer Science, asked by stevechamlingrai, 1 year ago

what is nested if-else?

Answers

Answered by Gyanendravaish
2
The if-else statement allows a choice to be made between two possible alternatives. Sometimes a choice must be made between more than two possibilities. For example the sign function in mathematics returns -1 if the argument is less than zero, returns +1 if the argument is greater than zero and returns zero if the argument is zero. The following C++ statement implements this function:

if (x < 0)
sign = -1;
else
if (x == 0)
sign = 0;
else
sign = 1;

stevechamlingrai: this answer is too advanced for me. i can't able to understand i'm just in class 10
Gyanendravaish: This simply means you can use if-else statement inside the if-else statement
Similar questions