Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.basic.visual.misc > #2235

how do you read in an integer in a console application?

Newsgroups comp.lang.basic.visual.misc
Date 2015-02-11 06:13 -0800
Message-ID <b7f784f4-00a0-47ce-8874-72e236ec1735@googlegroups.com> (permalink)
Subject how do you read in an integer in a console application?
From gdotone@gmail.com

Show all headers | View raw


i don't know the syntax for visual basic:

prompt user to enter number1
read in number1
prompt user to enter number2
read in number2

so.

Dim number1 As Integer
Dim number2 As Integer

Dim Sum As Integer

Console.WriteLine("Enter first number: ")
'what is the command to read in a number for console application

 Console.WriteLine("Enter second number: ")
'what is the command to read in a number for console application

sum = number1 + number2

'what is the command to display the sum for console application
Console.WriteLine( sum ) 

thanks, i trying to learn vb

g.

Back to comp.lang.basic.visual.misc | Previous | NextNext in thread | Find similar | Unroll thread


Thread

how do you read in an integer in a console application? gdotone@gmail.com - 2015-02-11 06:13 -0800
  Re: how do you read in an integer in a console application? G G <gdotone@gmail.com> - 2015-02-11 07:13 -0800
  Re: how do you read in an integer in a console application? Deanna Earley <dee@earlsoft.co.uk> - 2015-02-11 15:24 +0000
    Re: how do you read in an integer in a console application? G G <gdotone@gmail.com> - 2015-02-11 19:23 -0800
      Re: how do you read in an integer in a console application? G G <gdotone@gmail.com> - 2015-02-11 19:28 -0800

csiph-web