Вы находитесь на странице: 1из 2

MCA PROJECT- 13

1. Write a program in Visual Basic to accept two numbers and calculate their sum.

Program code:

Private Sub Command1__click () Dim num1 As Single Dim num2 As Single Dim Sum As Single num1 = Val (Text1. Text) num2 = Val (Text2. Text) Sum = num1 + num2 Text3.Text = Sum End Sub

Private Sub Command2__click () Text1. Text = Text2. Text = Text3. Text = End Sub

Private Sub Command3__click () End End Sub

Вам также может понравиться