'8) write a program to display greatest of three numbers
x = 10
y = 15
z = 20
If x>y And x>z Then
MsgBox "X is greater"
Else
If y>x And y>z Then
MsgBox "Y is greater"
Else
If z>x And z>y Then
MsgBox "Z is greater"
Else
MsgBox "all are equal"
End If
End If
End if
x = 10
y = 15
z = 20
If x>y And x>z Then
MsgBox "X is greater"
Else
If y>x And y>z Then
MsgBox "Y is greater"
Else
If z>x And z>y Then
MsgBox "Z is greater"
Else
MsgBox "all are equal"
End If
End If
End if
No comments:
Post a Comment