Exercise
Display a function
Objetive
Write a Visual Basic (VB.Net) program to "draw" the graphic of the function y = (x-4)2 for integer values of x ranging -1 to 8. It will show as many asterisks on screen as the value obtained for "y", like this:
*************************
****************
*********
****
*
*
****
*********
****************
Code
Imports System
Public Class exercise57
Public Shared Sub Main()
Dim x, y, j As Integer
For x = -1 To 8
y = (x - 4) * (x - 4)
For j = 0 To y - 1
Console.Write("*")
Next
Console.WriteLine()
Next
End Sub
End Class