Make a function that accepts 2 numbers. It will then print a X number of row of *, and Y number of column of *, based on the numbers we input.
class Program
{
static void Main(string[] args)
{
Print(6, 5);
Console.ReadLine();
}
public static void Print(int x, int y)
{
for (int i = 0; i < x; i++)
Console.WriteLine(new string('*', y));
}
}
Comments
Leave a comment