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 the source code for display the picture in button click event?
What is MSIL.
I have an opening for "APRIMO" Developer in Mumbai Location
What is the importance of a Button control?
Explain about delegate?
What are different types of jit ?
what is interface and when it is used?
In vb.net how to connect crystal report?
Using VB, how can you change the Mouse Pointer?
What do you mean by deserialization?
What is the Difference between Web User Control and Web Custom Control?
What is strong typing and weak typing?