5 replies
Triple Ha!
Assignment one, question 3?
Cheers,
Tim.
by tony3198
Actually tim you are partly correct, its an assingment from Ch3 VB6 by Deitel & Deitel. But it is not for school, as I am trying to learn this on my own. I came up with some results that are diamond shaped but when I change the font to courierit will not appear exactly as it does in the book. The code I used is: Private Sub Command1_Click()
For R = 1 To 10
For c = 10 To R Step -1
Print " ";
Next c
For X = 1 To R
Print "$";
Next X
Print
Next R
For R = 1 To 10 For c = 2 To R
Print " ";
Next c
For X = 11 To R Step -1
Print "$";
Next X
Print
Next R
End Sub
Hi,
In that case, well done.
Your Bold Courier is likely to be a proportional font and so the spacings aren't consistent.
Its not a fault of your code so dont be worried by it.
Cheers,
Tim.
by tony3198
After fooling with it for a while I finally got it. This works even w/courier Bold.
Private Sub Command1_Click()
For R = 1 To 10 Step 2
For c = 10 To R Step -2
Print " ";
Next c
For X = 1 To R
Print "$";
Next X
Print
Next R
For R = 1 To 7 Step 2
For c = -1 To R Step 2
Print " ";
Next c
For X = R To 7
Print "$";
Next X
Print
Next R
End Sub
by tony3198
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending