This is default featured slide 1 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

Showing posts with label if else. Show all posts
Showing posts with label if else. Show all posts

Sunday, December 9, 2012

Find greatest and smallest number between three numbers in visual basic.


Dim i, j, r As Integer
Private Sub Cmdgtr_Click()
i = Val(Txtnum1.Text)
j = Val(Txtnum2.Text)
r = Val(Txtnum3.Text)
If (i> j) And (i> r) Then
MsgBox "num1 is greater"
ElseIf (j >i) And (j > r) Then
MsgBox "num2 is greater"
Else
MsgBox "num3 is greater"
End If
End Sub
Private Sub CmdExit_Click()
End
End Sub





 Output
Note:- Please set some property of your control like caption or id corresponding to your control