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

Answers were Sorted based on User's Feedback



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

Answer / banshi

Sub Main()
Dim x, y As Integer
Console.Write("Enter value of x: ")
x = Console.ReadLine()
Console.Write("Enter value of y: ")
y = Console.ReadLine()
Console.Write("Sum x+y = ")
Console.WriteLine(x + y)
Console.ReadLine()
End Sub

Is This Answer Correct ?    124 Yes 34 No

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

Answer / 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

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

Answer / shamseena

imports system.console
sub main()
a,b,c as integer
Console.WriteLine("Ente a:")
ReadLine()
Console.WriteLine("Enter b:")
ReadLine()
c=a+b
Console.WriteLine("The Result is:"+c)
End Sub

Is This Answer Correct ?    43 Yes 23 No

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

Answer / rajesh

Sub main()
Dim a , b , c As Integer
System.Console.WriteLine("Enter a")
a = Console.ReadLine
System.Console.WriteLine("Enter b")
b = Console.ReadLine
c=a+b
System.Console.WriteLine("The value is")
MsgBox(c)
End sub

Is This Answer Correct ?    19 Yes 11 No

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

Answer / kaviyarasu

Imports system.console
Module Module1
Sub main()
Dim a, b, c As Integer
WriteLine("Ente a:")
a = ReadLine()
Console.WriteLine("Enter b:")
b = ReadLine()
c = a + b
WriteLine("The Result is:" & c)
ReadLine()
End Sub

End Module

Is This Answer Correct ?    14 Yes 8 No

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

Answer / 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

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

Answer / pavan kumar

imports system.console
sub main()
a,b as integer
c as String
Console.WriteLine("Ente a:")
ReadLine()
Console.WriteLine("Enter b:")
ReadLine()
c=a+b
Console.WriteLine("The Result is:"+c)
End Sub

Is This Answer Correct ?    22 Yes 19 No

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

Answer / kaviyarasu

Imports system.console
Module Module1
Sub main()
Dim a, b, c As Integer
Console.WriteLine("Ente a:")
a = ReadLine()
Console.WriteLine("Enter b:")
b = ReadLine()
c = a + b
Console.WriteLine("The Result is:" & c)
ReadLine()
End Sub

End Module

Is This Answer Correct ?    15 Yes 12 No

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

Answer / ambar

Sub Main()
Dim x, y As Integer
Console.Write("Enter value of x: ")
x = Console.ReadLine()
Console.Write("Enter value of y: ")
y = Console.ReadLine()
Console.Write("Sum x+y = ")
Console.WriteLine(x + y)
Console.ReadLine()
End Sub

Is This Answer Correct ?    10 Yes 7 No

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

Answer / sudhakar

imports system.console
sub main()
a,b,c as integer
Console.WriteLine("Enter a")
ReadLine()
Console.WriteLine("Enter b")
ReadLine()
c=a*b
Console.WriteLine("The Result is:"+c)
End Sub

Is This Answer Correct ?    19 Yes 18 No

Post New Answer

More VB.NET Interview Questions

What is the source code for display the picture in button click event?

0 Answers  


What is MSIL.

8 Answers   HDFC,


I have an opening for "APRIMO" Developer in Mumbai Location

1 Answers  


What is the importance of a Button control?

0 Answers  


Explain about delegate?

0 Answers  






What are different types of jit ?

0 Answers  


what is interface and when it is used?

0 Answers  


In vb.net how to connect crystal report?

1 Answers  


Using VB, how can you change the Mouse Pointer?

0 Answers   CGI,


What do you mean by deserialization?

0 Answers  


What is the Difference between Web User Control and Web Custom Control?

6 Answers   Benchmark,


What is strong typing and weak typing?

0 Answers  


Categories