i'm havin a hard time trying to use other looping statements, i cant get the proper syntax on other types of loops. i need to use others like while wend or something..ty

range = Text1.Text
If Text1.Text > 8 Then
a = MsgBox("Error", vbInformation, "Ooops!!")
End If

Print "Upper Left"
For x = 1 To range Step 1
    For y = 1 To x Step 1
       Print "*";
    Next y
    Print ""
Next x

Print ""
Print "Downward Left"
For x = range To 1 Step -1
    For y = x To 1 Step -1
        Print "*";
    Next y
    Print ""
Next x

Print ""
Print "Upper Right"
For x = range To 1 Step -1
    For y = x To 1 Step -1
        Print " ";
    Next y
    For z = x To range Step 1
        Print "*";
    Next z
    Print ""
Next x

Print ""
Print "Downward Right"
For x = range To 1 Step -1
    For z = x To range Step 1
        Print " ";
    Next z
    For y = x To 1 Step -1
        Print "*";
    Next y
    Print ""
Next x

Recommended Answers

All 3 Replies

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.