A good answer might be:Recall that for maximum accuracy, the loop control variable should be an integer type. So the modified loop should look like this:
| |
Rows of StarsLet us say that you want a program that writes out five rows of stars, such as the following (you are, evidently, easily amused): ******* ******* ******* ******* *******
This could be done with a This is a harder problem, since the user might ask for any number of stars per line, and no single println will be able to do that.Lines? 3 Stars per line? 13 ************* ************* ************* | |
QUESTION 16:Can a counting loop, such as we have been using, be used to count through the number of lines requested by the user? Click Here after you have answered the question |