Computer Science, asked by Harishhfhjb518, 9 months ago

Write a program in visual basic to add two numbers

Answers

Answered by surya1038
9

Answer:

NEW

10 CLS

20 INPUT"ENTER A NUMBER";N

30 INPUT"ENTER ANOTHER NUMBER";A

40 SUM=N+A

50 PRINT "SUM";SUM

60 END

RUN

Answered by qwcricket10
0

Visual Basic is an object-oriented programming language developed by Microsoft.

  • The main attractive advantage of the VB programming language is that it's convenient to use by all and it is easy to understand.
  • The program to print the sum result of two integer numbers is as follows.

  • Private Sub command1_click()
  • Dim X, Y, S As Integer              // here declaring input variable as integer type.
  • X = Val( Text1.Text)
  • Y = Val( Text2. Text)
  • S = X+Y
  • Label 3 = " The sum result of two numbers" X "and" Y " is " &S
  • End Sub

#SPJ3

Similar questions