Thursday, June 11, 2026

Nested IF Statement Example

IF ChallengerScore > ChampionScore

 THEN

    IF ChallengerScore > HighestScore

      THEN

         OUTPUT ChallengerName, " is champion and highest scorer"

      ELSE

         OUTPUT Player1Name, "is the new champion"

     ENDIF

 ELSE

   OUTPUT ChampionName, "is still the champion"

 IF ChampionScore > HighestScore

  THEN

     OUTPUT ChampionName, "is also the highest scorer"

 ENDIF

ENDIF

No comments:

Folk Arts of India

Madhubani Painting   - Region: Mithila, Bihar   - Period: Ancient (references from Ramayana)   - Artists: Traditionally, women   - Themes...