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

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

567


What are the advantages of vb.net and c#?

641


What is code security?

528


Explain the advantage of option strict on?

533


Explain strong name in .net assembly?

529






What is a preprocessor directive in vb.net?

548


Explain private assembly?

513


What is sealed class?

603


Explain about garbage collection?

583


What are the differences between vb.net and c#, related to oops concepts

576


What is the difference between vb 6 and vb.net?

646


What are the objects in asp.net?

545


what is intermediate language?

612


How to achieve Polymorphism in VB.Net?

623


Explain redim keyword?

548