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 (614)
 C Sharp interview questions  C Sharp Interview Questions (721)
 ASP.NET interview questions  ASP.NET Interview Questions (1442)
 VB.NET interview questions  VB.NET Interview Questions (150)
 COM+ interview questions  COM+ Interview Questions (41)
 ADO.NET interview questions  ADO.NET Interview Questions (198)
 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 :: Vsreedevi
I also faced this Question!!     Rank Answer Posted By  
 
  Re: how to get sum of two numbers in vb.net?
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 ?    106 Yes 32 No
Banshi
 
  Re: how to get sum of two numbers in vb.net?
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 ?    68 Yes 18 No
Sonia
 
 
 
  Re: how to get sum of two numbers in vb.net?
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 ?    40 Yes 20 No
Shamseena
 
  Re: how to get sum of two numbers in vb.net?
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
 
  Re: how to get sum of two numbers in vb.net?
Answer
# 5
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 ?    16 Yes 16 No
Sudhakar
 
  Re: how to get sum of two numbers in vb.net?
Answer
# 6
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
 
  Re: how to get sum of two numbers in vb.net?
Answer
# 7
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 ?    11 Yes 11 No
Kaviyarasu
 
  Re: how to get sum of two numbers in vb.net?
Answer
# 8
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 ?    9 Yes 7 No
Kaviyarasu
 
  Re: how to get sum of two numbers in vb.net?
Answer
# 9
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 ?    8 Yes 6 No
Ambar
 
  Re: how to get sum of two numbers in vb.net?
Answer
# 10
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 ?    4 Yes 8 No
Aman
 

 
 
 
Other VB.NET Interview Questions
 
  Question Asked @ Answers
 
what is delegates   2
what do you mean by .Net Framework Guru-Tech 17
what are the advantage in vb.net and different between vb and vb.net TCS 6
sir how i can calculate the value of two-textbox of gridview and show result in textbox within gridview in asp.net with vb.net..plz sir reply me Biz-Technology 2
what is the root namespace for all types?   7
What is the Difference between CLR & CTS?   3
how to restore database using vb.net? TCS 4
How to create Crystal Report in vb.net with coding Ascent 1
hey friends, Firstly I pick the records from the database into the DataGridView, Then I want that If I made any changes to the records in the GridView & Click on Update Button, Changes are Reflected into the main Database .Plz do reply back   4
Write a program that accepts an array of numbers, and two numbers (an element and a position in the array) and inserts the given element into nth position of the array.   2
write a VB.net program to swap two numbers   4
What is the Common Language Runtime? Ksb 10
 
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