Thursday, June 9, 2011

vb.net program to find greatest of three numbers

VB.Net program to find greatest of three numbers:

Private sub cmd1_Click()

Dim x(1 to 3) as Integer

For i = 1 to 3
x(i)=Inputbox("Enter value:" & i)
Next i

If x(1)>x(2) Then
   If x(1)>x(3) Then
   Print x(1) & " is greatest"
   Else
   Print x(3) & " is greatest"
   End If
Else
   If x(2)>x(3) Then
   Print x(2) & " is greatest"
   Else
   Print x(3) & " is greatest"
   End If
End If

End Sub

Earn upto Rs. 9,000 pm checking Emails. Join now!






Custom Search

No comments:

Post a Comment

amazon