programming-examples/c-sharp/Basic/C# program that takes a number as input and then displays a rectangle of 3 columns wide and 5 rows tall using that digit.cs
2019-11-18 14:44:36 +01:00

15 lines
406 B
C#

using System;
public class Exercise13
{
public static void Main()
{
int x;
Console.Write("Enter a number: ");
x=Convert.ToInt32(Console.ReadLine());
Console.WriteLine("{0}{0}{0}",x);
Console.WriteLine("{0} {0}",x);
Console.WriteLine("{0} {0}",x);
Console.WriteLine("{0} {0}",x);
Console.WriteLine("{0}{0}{0}",x);
}
}