網路城邦
上一篇 回創作列表 下一篇   字體:
數字三角形
2009/09/25 12:03:31瀏覽349|回應0|推薦2

  Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        '6X4三角形
        For i = 1 To 6
            For j = 1 To 5
                TextBox1.Text = TextBox1.Text & "*"
            Next
            TextBox1.Text = TextBox1.Text & vbCrLf
        Next

    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        '數字三角形1
        For i = 1 To 6
            For j = 1 To i
                TextBox2.Text = TextBox2.Text & i
            Next
            TextBox2.Text = TextBox2.Text & vbCrLf
        Next
    End Sub

  

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click


        '六排星星三角形
        For i = 1 To 6
            For j = 1 To i
                TextBox3.Text = TextBox3.Text & "*"
            Next
            TextBox3.Text = TextBox3.Text & vbCrLf
        Next
    End Sub

    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click


        '數字三角形2
        For i = 1 To 6
            For j = 1 To i
                TextBox4.Text = TextBox4.Text & j
            Next
            TextBox4.Text = TextBox4.Text & vbCrLf
        Next
    End Sub
End Class

( 心情隨筆心情日記 )
回應 推薦文章 列印 加入我的文摘
上一篇 回創作列表 下一篇

引用
引用網址:https://classic-blog.udn.com/article/trackback.jsp?uid=ghost4011&aid=3348972