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 do you mean by serialization and deserialization and it's use.
What are the two main parts of .net?
my project run very wel in my sytem yhen i am deploying my project on client machine ,after deployment i run my project then it show " can no find server name " what i do .
What is the maximum size of the textbox?
Explain the difference between datatable and dataset?
What is the differnce between managed code and unmanaged code?
Define naming convention?
What is the difference between custom control and user control?
Explain how can we remove handlers at run time?
How many classes a dll can contain?
described weak typing?
in my windows application i have to show excelwork sheetwhich is stored in the local system can any one tell me the code?