Computer Science Homework Solutions
Problem
#108138

Program Writing in Visual Basic

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.

Solution
What is this?
By OTA - Overall OTA Rating
Purchase Cost Now
$2.19 CAD (was ~$15.96)
Included in Download
  • Plain text response
$2.19 Instant Download
Add to Cart
Why you can trust BrainMass.com
  • Your Information is Secure
  • Best Online Academic Help Service
  • Students find real academic Success
Related Solutions
  • Visual Basic - 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 n ...
  • Sql Server 2005 Express - I am having trouble creating A View in SQL Server 2005 using the following table. I have selected subscriber_id and magazine_id, but I cannot create the correct code to complete the view. See at ...
  • Finishing the code for this SalesPersonDemo project - Need help finishing the code for this SalesPersonDemo project. This project has to be completed by tomorrow. This is a final project and I am totally lost as to how to code this properly. Attached is ...
  • Help with creating project. - Below is the code I have created for this Visual C# .Net project. I am not sure what to do to get the First name and last name. I am not even sure if I have done this right. Code does show me Salesper ...
  • Programming concepts - I need C# language, History, Data types, Iterations supported, Conditionals supported and hello world program.
Browse