Question: Write a Java program that generates exactly this display. Your solution must use nested loops. o oo ooo oooo ooooo oooooo ooooooo my code so

Write a Java program that generates exactly this display. Your solution must use nested loops.

o

oo

ooo

oooo

ooooo

oooooo

ooooooo

my code so far is as follows:

package smith5;

public class Triangle {

public static void main(String[] args) for (int beginning = 0; beginning < 7; beginning ++) { for (int end = 7; end > beginning; end --) { System.out.print(""); } for (int space = 0; space <= beginning; k++) { System.out.print("o"); } System.out.println(); } } I'm having issues with spacing of the o's if you could help.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!