Exercise
Rectangle V2
Objetive
Write a Visual Basic (VB.Net) program that asks for a number, width, and height, and displays a rectangle of that width and height, using that number for the inner symbol, as shown in the example below:
Enter a number: 4
Enter the desired width: 3
Enter the desired height: 5
444
444
444
444
444
Code
Imports System
Public Class exercises36
Public Shared Sub Main()
Dim n As Integer
Dim row, column As Integer
Console.Write("Enter a number: ")
n = Convert.ToInt32(Console.ReadLine())
Console.Write("Enter the desired: ")
width = Convert.ToInt32(Console.ReadLine())
Console.Write("Enter the desired height: ")
height = Convert.ToInt32(Console.ReadLine())
row = 0
While row
column = 0
While column
Console.Write(n)
column += 1
End While
Console.WriteLine()
row += 1
End While
End Sub
End Class