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

15 lines
406 B
C#
Raw Normal View History

2019-11-15 12:59:38 +01:00
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);
}
}