Need help with loop
- From: "meena.desani" <meena.desani@xxxxxxxxx>
- Date: 29 Oct 2006 16:34:51 -0800
why isn't the second part of my triangle not working?
import java.util.*;
public class triangle
{
public static void main(String[] args)
{
int nLines = 5;
for (int row = 1; row <= nLines; row++)
{
for (int star= 1; star <= row; star++)
System.out.print("*");
System.out.println();
}
}
}
.
- Follow-Ups:
- Re: Need help with loop
- From: Patricia Shanahan
- Re: Need help with loop
- From: Lew
- Re: Need help with loop
- From: Lion-O
- Re: Need help with loop
- Prev by Date: creating a repeating section
- Next by Date: Re: Need help with loop
- Previous by thread: creating a repeating section
- Next by thread: Re: Need help with loop
- Index(es):