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 |
Can you please explain the difference between namespace and assembly?
Explain about globalization?
What is the relation between Garbage collector and finalize and destructor?
What is the difference between custom control and user control?
Name the two main parts of .net?
What is sorting in vb?
what do you mean by .Net Framework
17 Answers Assurgent, College School Exams Tests, Guru Tech, Krishna Infotech, Ksb, Microsoft,
when do we need a multiple document interface?
i had attended to infosys interview on 17th april 2010...on .net..3+ experience .. to my knowledge i did well in technical and they asked me to wait for next process ..so i waited for 15 min ..later one person came and said give 7-10 days time for intimation of next process do they keep technical and hr on different day ...or i loose the interview ..am confused yaar please any say na what accuatly would be happend
What is trace in vb.net?
What is a static class?
Is vb.net dead?