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 you please explain the difference between system.string and system.stringbuilder classes?

546


What is the difference between system.applicationexception class and system.systemexception?

682


What is a static class?

596


Explain the differences between vb.net and c#, related to oops concepts?

521


Explain the use of new keyword?

557






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

460


difference between checkbox vs radiobutton??

2490


What is the difference between manifest and metadata?

550


Explain jagged array in vb.net?

566


Write a program that would find the nth term of a geometric progression, given the value of first term and common ratio. Any inbuilt function that the language provides for calculating exponent should not be used.

3112


Name the two main parts of .net?

523


Why do you need Lock in Visual Basic?

615


What is the use of assembly?

569


What is the maximum size of the textbox?

536


What is the advantage of using system.text.stringbuilder over system.string?

610