0 votes
92 views
in Discuss by (3.2k points)
edited
Give syntax of simple nested if – else statement?

1 Answer

0 votes
by (3.4k points)
selected by
 
Best answer
  if(condition) {
    //Nested if else inside the body of "if"
    if(condition2) {
       //Statements inside the body of nested "if"
    }
    else {
       //Statements inside the body of nested "else"
    }
}
else {
    //Statements inside the body of "else"
}
  

 

Related questions

0 votes
1 answer 91 views
asked Jun 11, 2022 in Discuss by nehapatil (3.2k points)
0 votes
1 answer 73 views
asked Jun 11, 2022 in Discuss by nehapatil (3.2k points)
0 votes
1 answer 115 views
0 votes
1 answer 126 views
0 votes
1 answer 102 views
asked Jun 11, 2022 in Discuss by nehapatil (3.2k points)
0 votes
1 answer 69 views

Doubtly is an online community for engineering students, offering:

  • Free viva questions PDFs
  • Previous year question papers (PYQs)
  • Academic doubt solutions
  • Expert-guided solutions

Get the pro version for free by logging in!

5.7k questions

5.1k answers

108 comments

537 users

...