Creating a Visual Basic Program
Not what you're looking for?
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
Purchase this Solution
Solution Summary
This solution provides assistance creating the Visual Basic Program
Solution Preview
(Let x be the size of the diamond)
Dim x As Integer
Dim r As Integer
Dim c As Integer
Dim d As Integer
x= 17
if ( x mod 2 = 0) then
x = x + 1
End If
d = x/2 + 1
For r = 1 To d ...
Purchase this Solution
Free BrainMass Quizzes
C# variables and classes
This quiz contains questions about C# classes and variables.
Javscript Basics
Quiz on basics of javascript programming language.
Basic Networking Questions
This quiz consists of some basic networking questions.
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.
Excel Introductory Quiz
This quiz tests your knowledge of basics of MS-Excel.