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

What is the difference between convert.tostring and .tostring() method?

607


How a base class method is hidden?

701


List the different types of assembly?

623


What is the significance of delegates. Where should they be used?

578


What are the different variables in vb.net?

595






What is the use of internal keyword?

658


What is trace in vb.net?

678


How to send xml file on server using http protocol?

615


How to connect crystal report in vb.net ?

645


What are the difference between dispose(), close(), exit(), end()?

584


What is a stream in vb.net?

625


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

545


What are the technology areas that microsoft.net contains?

645


What is portable executable?

672


Explain about rapid application development tool?

603