Lab 6: Stars 1

Goals: To write a nested loop structure that does not produce "square" output

What to do: Write a Java application that will read in from the user the width of the picture they want and the character they would like to use. The user may just press enter when prompted for the character and get the default character (which is an asterisk).

Sample Output:

Please enter the width of the picture: 9
Please enter the character to use:
*
* *
* * *
* * * *
* * * * *
* * * * * *
* * * * * * *
* * * * * * * *
* * * * * * * * *

Please enter the width of the picture: 3
Please enter the character to use: ^
^
^ ^
^ ^ ^
What to submit: Show me your program when completed.

 © Daubenmier/Ehrenfried 2005
Comments