Purchase Solution

Program Writing in Visual Basic

Not what you're looking for?

Ask Custom Question

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

Any help is greatly appreciated.

Purchase this Solution

Solution Preview

------------------------------------------------------

Dim i As Integer
Dim y As Integer
Dim j As Integer
Dim s As ...

Purchase this Solution


Free BrainMass Quizzes
Basic Computer Terms

We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.

Excel Introductory Quiz

This quiz tests your knowledge of basics of MS-Excel.

Word 2010: Tables

Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.

Java loops

This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.

Inserting and deleting in a linked list

This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.