how to get sum of two numbers in vb.net?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
What is global assembly cache (gac)?
What is stack used for in vb. Net?
How is VB.Net different from VB6?
Explain about rapid application development tool?
When do you use virutal keyword?
How do you validate Date by using which validation Control?
sql satement for 2nd maximum value
What are the differences between c# and visual basic.net?
Name the class which allows an element to be accessed using unique key?
What is difference between import system.data.sqlclient,system.data.oledb?
Is VB.NET object oriented? What are the inheritances does VB.NET support ?
13 Answers Digital GlobalSoft, Global Infotech, Infosys,
difference between control and component more than one differences