DEV Community

Discussion on: A Beginner Program I'm Rather Proud Of

 
rachelsoderberg profile image
Rachel Soderberg

I think you're correct and my solution was iterative as well, to write the correct number of rows. My understanding is that a recursive method calls itself, as you said. Defining methods in C# is where I wrote "private static void PrintGridSquares(int squareCounter){} and calling a method looks like PrintGridSquares(value). I called the method originally in Main(), then it gets called by itself for the number of squares in the grid (squareCounter). I created a new line at each row end, to make it a square grid.

I hooe that helps clear it up a bit!