Public Class Form1
Dim a, b, c, a1, a2 As Integer
Dim a3, a4 As String
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
a3 = ""
a4 = ""
a1 = TextBox1.Text
a2 = TextBox2.Text
For a = Len(a1) To 1 Step -1
a3 = a3 & Mid(a1, a, 1)
Next
For b = Len(a2) To 1 Step -1
a4 = a4 & Mid(a2, b, 1)
Next
c = Val(a3) + Val(a4)
TextBox3.Text = c
End Sub
End Class
2009年3月13日 星期五
以前校內程式設計比賽的題目-第四題
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言