Im learning visual basic and hopefully someone will be able to help out. I did the first part of my project now can someone please help me out with the second part
Project1: Make a program that will print a triangle of stars. User must be able to input amount of stars on bottom row.
"
Public Sub Main()
Dim Counter As Integer
Dim NumOfStars As Integer
Dim Stars As String
Stars = "*"
NumOfStars = InputBox("Please input number of stars on bottom row:")
For Counter = 1 To NumOfStars
Debug.Print Stars; ""
Stars = Stars + "*"
Next Counter
End Sub
"
Project1b: Do the same as above except opposite way around i.e upside down triangle. answer should look something like this
*****
****
***
**
*
and this is how i tryed to answer the question even though i did it wrong
"
Public Sub Main()
Dim Counter As Integer
Dim NumOfStars As Integer
Dim Stars As String
NumOfStars = InputBox("Please input number of stars on top row:")
Stars = "*"
For Counter = NumOfStars To 1 Step -1
Debug.Print Stars; ""
Stars = Stars - "*"
Next Counter
End Sub
"
anyone know the answer to the project1b?
thanks


Reply With Quote
