In the above example, the conditional branching nested if statement is used to check two conditions in a nested loop. First "if" statement checks if the age is between 10 to 50 if true, another if loop checks if the age is between 10 to 18.