Exercise
Rectangle
Objetive
Write a Visual Basic (VB.Net) program to ask the user for a number and then display a rectangle 3 columns wide and 5 rows tall using that digit. For example:
Enter a digit: 3
333
3 3
3 3
3 3
333
Code
Imports System
Public Class exercise13
Public Shared Sub Main()
Dim x As Integer
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)
End Sub
End Class