84.3k views
5 votes
PLEAS help me with the number triangle

PLEAS help me with the number triangle-example-1
User Hagope
by
5.1k points

1 Answer

1 vote

Answer:

public static void makeNumberTriangle() {

for(int i=1; i<=5; i++) {

for(int j=1; j<=i; j++) {

System.out.printf("%d ",j);

}

System.out.println();

}

}

Step-by-step explanation:

You were very close!

User PinkFloydRocks
by
4.8k points