Computer Science Canada

NEED some help with....

Author:  Fatalsh0ts [ Thu Mar 12, 2009 7:49 pm ]
Post subject:  NEED some help with....

heres the problem

2. Make a loop which would continuously display the number system starting from 0 and continuing ?forever? (until the user closes the window)
E.g.
0
1
2
3
4
5
etc... cant seem to solve this problem
code:

var numb1, numb2, numb3 : int
const x := 1
numb1 := 0 + x
numb2 := numb1 + x
numb3 := numb1 + 2*x
loop
    put "0"
    put numb1
    put numb2
    put numb3
end loop

Author:  Tony [ Thu Mar 12, 2009 7:53 pm ]
Post subject:  RE:NEED some help with....

please use code tags.

Hint: the question asks to only display the numbers; you don't need to keep all of them in memory.

Author:  Fatalsh0ts [ Thu Mar 12, 2009 8:01 pm ]
Post subject:  RE:NEED some help with....

srry i still dont get it... and what are code tags

Author:  Tony [ Thu Mar 12, 2009 8:14 pm ]
Post subject:  Re: NEED some help with....

[code="turing"][/code]

what is it, that you are having problems with understanding, for this problem?

Author:  Fatalsh0ts [ Thu Mar 12, 2009 8:16 pm ]
Post subject:  RE:NEED some help with....

nvm got it thnx anways


: