Originally posted by mark ralphael:
Hi Marc, thanks for the answer.
I was unable to resolve this trivial question, can you give me any advice on how i should go about solving the problem. I wouldn't of thought of doing a nested loop ???
Write a Java program to print out five lines.
On each of these lines, have it print the same number of characters as the line number. That is, for line one, print one character. For line two, two characters, and so on.
(Oh, and by the way... the character I want to you print should match the line number.)
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Originally posted by marc weber:
(By the way, that binary approach is pretty clever.)
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
What? What, what, what? What what tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
|