Computer Science Canada

input number lets u input that amount of numbers help

Author:  con.focus [ Wed Jan 05, 2005 8:00 pm ]
Post subject:  input number lets u input that amount of numbers help

how can i input a number a tell turing to read that number
n let me inout that amount of number.

ex lets say i inout 5 turing will then let me input 5 more numbers


can u provide code or suggestions on how to do this

Author:  MihaiG [ Wed Jan 05, 2005 8:22 pm ]
Post subject: 

use a for loop i.e


code:

var x, a, b :i nt
put "How mayn numbers  need"
get x
for i : 1 .. x
...
end for

understand..

Author:  con.focus [ Wed Jan 05, 2005 9:09 pm ]
Post subject: 

sry dont need no more but thx ne way elcomandante

Author:  Cervantes [ Thu Jan 06, 2005 4:39 pm ]
Post subject: 

ELCOMANDANTE wrote:

code:

var x, a, b :i nt
put "How mayn numbers  need"
get x
for i : 1 .. x
...
end for


What's the point of the two extra variables? From what I've seen, you quite often have these extra, useless, and poorly named variables in all your programs. Eh


: