2017年10月14日 星期六

乘法表



Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim A, B, C, I, J As Integer
        Dim S1 As String
        S1 = Space(4)
        A = Val(TextBox2.Text)
        B = Val(TextBox3.Text)
        If A >= 19 Then
            A = 19
            TextBox2.Text = A.ToString
        End If

        If B >= 19 Then
            B = 19
            TextBox3.Text = B.ToString
        End If

        TextBox1.Clear()

        For I = 1 To A Step 1
            For J = 1 To B Step 1
                C = I * J
                TextBox1.Text = TextBox1.Text + S1
                TextBox1.Text = TextBox1.Text + C.ToString
                If J = B Then
                    TextBox1.Text = TextBox1.Text & vbNewLine & vbNewLine
                End If
            Next J

        Next I
    End Sub
End Class

沒有留言:

張貼留言

Node-Red --> MQTT --> Fuxa

Node-Red --> MQTT --> Fuxa      FUXA(一個開源的 Web HMI / SCADA 自動化監控軟體)的專案設定檔 。 這份設定檔完整定義了 HMI 監控畫面的 後端通訊(MQTT 連線、點位標籤) 與 前端網頁圖形介面(SVG 畫布...