Help with a project

TBK

New member
Joined
Mar 16, 2005
Messages
1
Programming Experience
Beginner
Hi, I'm a new VB programmer. I've been taking a college class and as all classes go there are projects assigned. I'm making an application that will create a square of sorts from a character you input. I've gotten it to work however the assignment specifications state that I need a For...Next statement nested in another for...next statement and right now I'm using a loop. I've tried a ton of different combinations of nested for...next statements but I can't seem to get any of them to work right. Any insight or help would be appreciated, the app is attatched.
 

Attachments

  • RyanSquareApplication.zip
    26.4 KB · Views: 55
here you go - nested for next

Sub DisplaySquare(ByVal intSize As Integer, ByVal intSize1 As Integer, ByVal strFillCharacter As String, ByVal strDisplay As String)
'Create the Square
Dim intCounter As Integer
For intCounter = 1 To CInt(txtSquareSize.Text) 'convert to integer
For intSize1 = 1 To intSize1
strDisplay &= strFillCharacter
Next
For intSize = intSize To intSize
strDisplay &= ControlChars.CrLf
Next
intSize1 -= 1
Next intCounter
txtDisplay.Text = String.Format(strDisplay)
End Sub
 
Last edited:
Back
Top