การเปรียบเทียบคัวเลขมากสุดโดยใช่คำสั่ง If...else
Algorithm"
Code"
Public Class Form1
Private Sub bttstart_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bttstart.Click
Dim n1, n2, max As Double
n1 = txt_n1.Text
n2 = txt_n2.Text
max = n1
If n2 > max Then
max = n2
End If
txt_output.Text = max
End Sub
Private Sub bttexit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bttexit.Click
Me.Close()
End Sub
End Class
ความคิดเห็น
แสดงความคิดเห็น