Public Class Form1
Dim a0, a1, a2, b0, b1, b2, c0, c1, c2, d0, d1, d2 As Single
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
a0 = TextBox1.Text
b0 = TextBox2.Text
c0 = TextBox3.Text
a1 = a0 * 0.445
a2 = a0 * 0.01
b1 = b0 * 0.038
b2 = b0 * 0.019
c1 = c0 * 0.368
c2 = c0 * 0.18
d0 = a0 + b0 + c0
d1 = a1 + b1 + c1
d2 = a2 + b2 + c2
Label10.Text = Str(a1)
Label11.Text = Str(a2)
Label12.Text = Str(b1)
Label13.Text = Str(b2)
Label14.Text = Str(c1)
Label15.Text = Str(c2)
Label7.Text = Str(d0)
Label8.Text = Str(d1)
Label9.Text = Str(d2)
End Sub
End Class
沒有留言:
張貼留言