how to get sum of two numbers in vb.net?

Answer Posted / sonia

Sub Main()
Dim x, y, sum As Integer
Console.WriteLine("Enter two numbers")
x = Console.ReadLine()
y = Console.ReadLine()
sum = x + y
Console.WriteLine("Sum = " & sum)
Console.ReadLine()
'& is used for concatenation
End Sub

Is This Answer Correct ?    75 Yes 19 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain how to store decimal data in .net?

715


What are option strict and option explicit?

796


What is econo-jit?

616


Using VB, how can you change the Mouse Pointer?

640


Sir, what code to store data from vb net sql server 2008 to 2005 and at the same time in order to validate the data entered is not the same, but there have been contacts in the module. Examples such as the log table that I created, the user name as the primary key.

1755






Can you please explain the difference between authentication and authorization?

542


What is the difference between convert.tostring and i.tostring method?

557


Describe about visual basic.net?

562


Can you please explain the difference between system.string and system.stringbuilder classes?

546


What is trace in vb.net?

590


Can you please explain the difference between vb and vb.net?

462


How to create a constant in vb.net?

600


Explain the components of common language runtime.

521


What is enumerator?

569


Explain an assembly and its use?

531