James said:
John wrote:
Patricia Shanahan wrote:
Alex Hunsley wrote:
James Bryan Chua wrote:
Alright I'm having a bit of trouble getting started for this
assignment in my Java class.
[snip description]
Shame that! Did you actually have a question for us?
Did you try the exercise? How far did you get? What happened?
The quoted sentence says "I'm having a bit of trouble getting started"
so I assume he did not get very far, and needs advice on how to get
started, which I sent in my first response.
Patricia
OP - We need more information...
I don't see that we do. Remember the objective is to help the OP get
started, not to do the assignment for him.
Patricia
In no way, was I trying to get anyone to give me the answer.. I really
want to learn to program well and was just stuck on this problem..
I've figured out how to make a left justified triangle by prompting
for input n and using a for loop where i < n to print out "[]" *(i+1).
Now, I'm just unsure how to do it where the triangle is centered and
right justified. Any advice? Thank you.
Ah, much better...
We have a much better idea of how to help people if they say exactly how
far they've got, and what problems they might now be having. Now we know
you're not just hoping for a readymade solution to be dropped on your
lap like some other people are!
So, doing a few sketches on paper of the various example would be a good
idea, as others have suggested, and Patricia's advice is good.
A hint: you might want to be outputting some space characters (' ')
before things in order to get visible characters like '[]' to appear
more to the right of the screen...
lex