ask about fever (#1) if ( patient has fever ) { ask about sore throat and headache (#2) if ( patient has sore throat ) { say he has STREP THROAT } else { more nested if statements to deal with #3, #4 and #5 } } else { ask about runny nose (#6) if ( patient has runny nose) { say that he has ALLERGIES } else { ask about sneezing (#7) if ( patient is sneezing ) { say he has a COLD } else { more code to deal with #8 } } }