Question: use C# Read one integer from the Console. This will be the number of columns of stars in the grid. Use nested loops to display

use C#

Read one integer from the Console. This will be the number of columns of stars in the grid. Use nested loops to display a square grid composed of stars (*) and dashes (-). The grid should have numRows rows and as many columns of stars as were read from the Console. For example, if numRows is 3 and the user enters 5, the output should look like this:

*-*-*-*-*

*-*-*-*-*

*-*-*-*-*

Read from the Console as usual. The tester will provide values on the standard input. You do not need to print a prompt.

You do not need to create the variable numRows or give it a value. The tester will do this for you.

Your program will be tested multiple times using different values. To pass the challenge, all of the tests must succeed.

use this format for your code please

using System;

namespace CustomStarGrid

{

class Program

{

public void Run(int numRows)

{

/** WRITE YOUR SOLUTION HERE **/

}

}

}

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!