Loops 3 - Nesting


examples


Classwork

In a Word document:

For each, think about input, including variable names and types; prompt the user for input.

  1. Make up a secret number and make the user guess until they get it, each time telling them whether their guess was too high, too low, or correct.
  2. Quiz the user on the sums of numbers from 1+1, 1+2, 1+3... to 9+7, 9+8, 9+9 (including all combinations in between) for each sum, make them keep trying to answer until they get it right.