Write a program to create a menu to perform arthimetic operations using menu control array.

Write a program to create a menu to perform arthimetic operations using menu control array.

Private Sub MnuCal_Array_Click(Index As Integer)

Dim a As Single

Dim b As Single

Dim c As Single

a = InputBox("Enter 1st number")

b = InputBox("Enter 2nd number")

Select Case Index

Case 0

    c = a + b

Case 1

    c = a - b

Case 2

    c = a * b

Case 3

    c = a / b

End Select

MsgBox "Result "& c

End Sub


Comments