for
loop table practice
Create a table of the number of stars on each line:
******* ***** *** * |
|
multiplier: How much does the # of stars change between lines? -2 shift: Given your multiplier, what must be added to get that many stars on line 1? 9 |
Test your loop expression in Practice-It! using the checkmark icon above. Use the form:
for (int stars = 1; stars <= multiplier * line + shift; stars++) {