ALLInterview.com :: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Google
   
 
Categories >> Software >> Microsoft Related >> VB.NET
 
 


 

 
 Visual Basic interview questions  Visual Basic Interview Questions (615)
 C Sharp interview questions  C Sharp Interview Questions (722)
 ASP.NET interview questions  ASP.NET Interview Questions (1443)
 VB.NET interview questions  VB.NET Interview Questions (150)
 COM+ interview questions  COM+ Interview Questions (41)
 ADO.NET interview questions  ADO.NET Interview Questions (199)
 IIS interview questions  IIS Interview Questions (86)
 MTS interview questions  MTS Interview Questions (5)
 Crystal Reports interview questions  Crystal Reports Interview Questions (62)
 BizTalk interview questions  BizTalk Interview Questions (33)
 Dot Net interview questions  Dot Net Interview Questions (861)
 Exchange Server interview questions  Exchange Server Interview Questions (103)
 SharePoint interview questions  SharePoint Interview Questions (25)
 WCF interview questions  WCF Interview Questions (8)
 Microsoft Related AllOther interview questions  Microsoft Related AllOther Interview Questions (193)
Question
how to get sum of two numbers in vb.net?
 Question Submitted By :: VB.NET
I also faced this Question!!     Answer Posted By  
 
Answer
# 1
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 ?    107 Yes 33 No
Banshi
 
Answer
# 2
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 ?    69 Yes 18 No
Sonia
 
 
 
Answer
# 3
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 ?    41 Yes 20 No
Shamseena
 
Answer
# 4
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 ?    20 Yes 16 No
Pavan Kumar
 
Answer
# 5
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 ?    13 Yes 9 No
Rajesh
 
Answer
# 6
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 ?    10 Yes 7 No
Kaviyarasu
 
Answer
# 7
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 ?    9 Yes 6 No
Ambar
 
Answer
# 8
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 ?    17 Yes 16 No
Sudhakar
 
Answer
# 9
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 ?    12 Yes 11 No
Kaviyarasu
 
Answer
# 10
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 ?    1 Yes 0 No
Shaker
 

 
 
 
Other VB.NET Interview Questions
 
  Question Asked @ Answers
 
Where would you use Abstract class and Interface?   4
IT openings for Experienced candiates for Java / .NET   1
is it possible to use flexgrid in vb dotnet? Microsoft 9
how many server controls are presented in vb.net   2
when a program of vb.net is written in notepad it occupies always 1kb of memory why?   1
sql satement for 2nd maximum value NIIT 15
How do you rate yourself in .NET ? Infosys 3
what do you mean by .Net Framework Guru-Tech 17
when we will use console ?   3
What is an indexed property?   1
What are the objects in asp.net and tell the purpose of those objects Ascent 3
Where is the Version Information Stored on a assembly ? Write the Namespace to load assemblies at runtime Can you allow a class to be inherited but prevent the method from being overridden ? What happens in memory when you box and unbox a value type ? Write a progtam to convert decimal to byte without using library function. HCL 2
 
For more VB.NET Interview Questions Click Here 
 
 
 
 
 


   
Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
   
Copyright 2013  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  KalAajKal.com