Nested If:-
Writing an if statement in another if statement is called “Nested if”.
Syntax:- if (condition)
{
if (condition)
{
Statement
}
else
{
Statement
}
}
else
{
………….
}
Questions:- 1. Wap to find largest value between 3 numbers.
2. Wap to find division of student with 5 subject marks through percentage.
3. Wap to input run scored by a cricket player and check whether it is half century, century, double century or triple.