Let's you know the code.
Design form:
1 form
2. one textbox and set to Multiline
the code is :
Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim n, y, a, b As Integer
For n = 1 To 6
y = 1
TextBox1.TextAlign = HorizontalAlignment.Center
Do While y <= n
TextBox1.Text = TextBox1.Text & " " & y
y = y + 1
Loop
TextBox1.Text = TextBox1.Text & vbCrLf
Next
For a = 5 To 1 Step -1
b = 1
Do While b <= a
TextBox1.Text = TextBox1.Text & " " & b
b = b + 1
Loop
TextBox1.Text = TextBox1.Text & vbCrLf
Next
End Sub
End Class
run your project and ....
See you again
.bmp)
No comments:
Post a Comment