Re: Need help with loop
- From: Lew <lew@xxxxxxxxxxx>
- Date: Sun, 29 Oct 2006 20:24:36 -0500
Lion-O wrote:
Actually, the braces matched. The for loop has only one line, the System.out.print().why isn't the second part of my triangle not working?
for (int row = 1; row <= nLines; row++)
{
for (int star= 1; star <= row; star++)
System.out.print("*");
System.out.println();
}
Note the missing { ?
Note that in the original post there were three opening braces and three closing braces. Adding one opening brace would cause compilation failure.
- Lew
.
- References:
- Need help with loop
- From: meena.desani
- Re: Need help with loop
- From: Lion-O
- Need help with loop
- Prev by Date: Re: Need help with loop
- Next by Date: Re: Need help with loop
- Previous by thread: Re: Need help with loop
- Next by thread: Re: Need help with loop
- Index(es):
Relevant Pages
|