The Puzzling Pyramid Program Assignment

In my computer science class, our professor gave us an assignment of writing a program that would print out a pyramid made of starts. In order to do my assignment computer science concepts of loops inside of loops had to be used. Upon my first attempt of trying to write the program, I was met with a few compiler errors. I changed the program until I got it to correctly compile, but then another problem came up. Once the program was executed, it would print out an endless number of stars and wouldn’t stop until the program was halted.…