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

Answer Posted / shaker

Dim X As Integer
Dim Y As Integer
Dim Sum As Integer
Sub Main()
Console.WriteLine("Enter the number for X")
X = Console.ReadLine()
Console.WriteLine("Enter the number for Y")
Y = Console.ReadLine()
Sum = X + Y
Console.WriteLine("The sum of Two numbers is: " & Sum)

Console.ReadLine()


End Sub

End Modu

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the difference between dispose(), close(), exit(), end()? When do we use them?

639


Can we use Vb.Net and C# language simultaneously in one .Net application?

657


described weak typing?

677


Which is the base class for all the classes in .net framework?

637


Can you please explain the difference between namespace and assembly?

631






What is globalization?

631


What is the feature which is common to all .net languages?

558


What is late binding and early binding?

636


Explain about garbage collection?

666


Explain the difference between an xml "fragment" and an xml "document."

585


How do you script this scenario in QTP using VB? Verify XML attributes in XML message against XSD and data mapping of fields to Oracle tables? Verify data in XML to data in a defined table?

2650


Name and explain some of the exclusive features which are present in vb?

625


What is the main purpose of garbage collector?

596


What is the main use of a namespace?

616


Explain the difference between dispose and finalize()?

636