Paul's Tutorials - logo1-4Switch/Case Statements



Reading

Go here:
Jump Statements / Switch-Case
and read through the rest of the page.

Extra Reading

Companion Video

Practice

Once you feel comfortable with the above content, complete the following practice program.

Rewrite the Fate program using switch/case statements.

Give the user the option to drink a yellow potion or a green potion (use a string). Give the user the option to open to pick door one or two (use an int).


← 1-3 Loops 1-4 Switch/Case Statements Chapter 2: Organization →