0 like 0 dislike
asked in Computer Science by (474k points)
What is nested-if statement?

1 Answer

0 like 0 dislike
answered by (474k points)
A nested "if" statement is the true condition in a series of conditions in computer programming. It is used when multiple responses are possible and the outcome for each response is different.

An example of a nested "if" statement is the following: If the result is a number between three and five, print it in the color blue. If the result is a number less than three, print it in red. If the result is any other number, print it in green. Different computer languages have limits on the number of "if" statements that may be nested. Nested "if" statements are also called "if-then" or "if-else" statements.
Welcome to Free Homework Help, where you can ask questions and receive answers from other members of the community. Anybody can ask a question. Anybody can answer. The best answers are voted up and rise to the top. Join them; it only takes a minute:

10.2k questions

9.2k answers


3.2k users


Free Hit Counters