Do you have any


I am having trouble creating a program in Visual Basic that prints the * in a diamond shape. Do you have any suggestions?

This is what I have so far. It is an un-proportioned diamond, I need a normal diamond. What am I doing wrong?

Dim i As Integer

Dim y As Integer

Dim j As Integer

For i = -9 To 9

y = System.Math.Abs(i)

y = (y * (-1)) + 10

Console.WriteLine("")

For j = 1 To y

Console.Write("*")

Next

i += 1

Next

 

Solution Preview :

Prepared by a verified Expert
Visual Basic Programming: Do you have any
Reference No:- TGS01244195

Now Priced at $20 (50% Discount)

Recommended (93%)

Rated (4.5/5)