using System;
public class Test
{
public static void Main()
{
var length = Console.ReadLine();
int l = Convert.ToInt32(length);
var breadth = Console.ReadLine();
int b = Convert.ToInt32(breadth);
PrintPattern print = new PrintPattern();
print.PrintRectangle(l,b);
}
}
public class PrintPattern
{
public void PrintRectangle(int l,int b)
{
for(int i=0;i<b;i++)
{
for(int j=0;j<l;j++)
{
Console.Write("*");
}
Console.WriteLine();
}
}
}
Input:
5 3
Output
public class Test
{
public static void Main()
{
var length = Console.ReadLine();
int l = Convert.ToInt32(length);
var breadth = Console.ReadLine();
int b = Convert.ToInt32(breadth);
PrintPattern print = new PrintPattern();
print.PrintRectangle(l,b);
}
}
public class PrintPattern
{
public void PrintRectangle(int l,int b)
{
for(int i=0;i<b;i++)
{
for(int j=0;j<l;j++)
{
Console.Write("*");
}
Console.WriteLine();
}
}
}
Input:
5 3
Output
***** ***** *****
Comments
Post a Comment