I had to do a diamond once, making two triangles. I could post the code if you need it, but it looks like you've already got it solved.
server_crash
Postaholic
2,111 posts since Jun 2004
Reputation Points: 113
Solved Threads: 20
So you want to print that. What are we supposed to do, write it for you?
jasimp
Senior Poster
3,623 posts since Aug 2007
Reputation Points: 533
Solved Threads: 53
Inside a for-loop you will have a System.out.print("*") How many times will this for loop will execute will determine how many * you will have at each line.
Then you will put it in another for-loop which you will use to determine how many lines you will have:
for () {
for () {
System.out.print("*")
}
System.out.println(""); //for changing lines
}
What will you put in the for as arguments(counters) will be up to you.
javaAddict
Nearly a Senior Poster
3,329 posts since Dec 2007
Reputation Points: 1,014
Solved Threads: 448
if u need help in this. you should quit. can't even do this simple homework shows that your skills should be somewhere else.
TheBuzzer
Junior Poster in Training
52 posts since Jul 2008
Reputation Points: 15
Solved Threads: 0
i want to print
******
****
**
*
Okay coolSo you want to print that. What are we supposed to do, write it for you?
Common, it isn't that hard
System.out.println(
******
****
**
*);
Have a nice day now :D
bloody_ninja
Junior Poster in Training
96 posts since Jul 2008
Reputation Points: 9
Solved Threads: 2
Quotes are always nice too. But I think bloody_ninja had his tongue firmly in cheek with that post. Hence the :D avatar. Also let me be the first to point out that this thread started in 2005, then was revived in February, then again in April, then again today (I'm on the West Coast, so it's still July 14).
VernonDozier
Posting Expert
5,527 posts since Jan 2008
Reputation Points: 2,633
Solved Threads: 711
Hmm you make a valid point
*facepalms*
Why the heck did TheBuzzer have to bump this XD
bloody_ninja
Junior Poster in Training
96 posts since Jul 2008
Reputation Points: 9
Solved Threads: 2
Common, it isn't that hard
System.out.println(
******
****
**
*);
It don't care how easy it is. It is a matter of not doing anyone's work, even the simplest request. If you do that for them then they want you to do everything. http://www.daniweb.com/forums/announcement9-2.html
jasimp
Senior Poster
3,623 posts since Aug 2007
Reputation Points: 533
Solved Threads: 53
Hmm you make a valid point
*facepalms*
Why the heck did TheBuzzer have to bump this XD
I was searching for using graphics 2d to do Strokes and Shapes and this post came up as one of the result.
And When i read it. I knew right away it was a homework problem and didn't notice a date.
I wonder do teachers still assign this as a homework problem. lets see I did this in like my first year in college which was 4 years ago.
TheBuzzer
Junior Poster in Training
52 posts since Jul 2008
Reputation Points: 15
Solved Threads: 0
It don't care how easy it is. It is a matter of not doing anyone's work, even the simplest request. If you do that for them then they want you to do everything.
http://www.daniweb.com/forums/announcement9-2.html
Yes, I read that thread and I thought it was pretty apparent what he said, almost as if it was a joke.
I mean, he said "print" a few asterisks and there is a feature known as system.out.println.
Hey, it doesn't matter if they want you to do everything, it is up to you. But I just stated out a common function, not much harm done.
bloody_ninja
Junior Poster in Training
96 posts since Jul 2008
Reputation Points: 9
Solved Threads: 2