Uber Fr0g
03-01-2006, 05:47 AM
I have progressed pretty far in my deitel book, but once again i hava managed to stumble upon something i have no idea how to do. This is what it says:
Write and application that displays the following patterns, but create each one in a seperate .java file. Use for loops to generate the patterns. All asteriks (*) should be printed by a single statement of the form System.out.print( '*' ); wich causes the asteriks to print side by side. A statement of the form System.out.println(); can be used to move to the next line. A statement of the form System.out.print( ' ' ); can be used to display a space for the last two patterns. There should be no other output statements in the program.
heres the patterns it wants me to print out.
(a)
*
**
***
****
*****
******
*******
********
*********
**********
(b)
**********
*********
********
*******
******
*****
****
***
**
*
(c)
**********
*********
******** I cant get this one to show up right, but the right side
******* should bestraight
******
*****
****
***
**
*
(d)
*
**
***
**** This one wont show right either, the right side should be straight.
*****
******
*******
********
*********
**********
Write and application that displays the following patterns, but create each one in a seperate .java file. Use for loops to generate the patterns. All asteriks (*) should be printed by a single statement of the form System.out.print( '*' ); wich causes the asteriks to print side by side. A statement of the form System.out.println(); can be used to move to the next line. A statement of the form System.out.print( ' ' ); can be used to display a space for the last two patterns. There should be no other output statements in the program.
heres the patterns it wants me to print out.
(a)
*
**
***
****
*****
******
*******
********
*********
**********
(b)
**********
*********
********
*******
******
*****
****
***
**
*
(c)
**********
*********
******** I cant get this one to show up right, but the right side
******* should bestraight
******
*****
****
***
**
*
(d)
*
**
***
**** This one wont show right either, the right side should be straight.
*****
******
*******
********
*********
**********