Posted: Tue Jan 08, 2008 6:25 pm Post subject: how to tell viewer to put in a number between 1 to 5, then press enter, then it gives out the number.
do you guys know how i can first ask the view to "input a number between 1 and 5, then press enter"
then after they press enter, the computer should say "the number you entered is..."
Sponsor Sponsor
syntax_error
Posted: Tue Jan 08, 2008 6:42 pm Post subject: Re: how to tell viewer to put in a number between 1 to 5, then press enter, then it gives out the number.
but jsut to answer your question
here a little bit
Turing:
var num:int put"enter a number from 1 to 5"
if num <=5 & num <=1then put"you number was "+num
endif
elseput"your number was not form 1 to 5"
shakin cookie
Posted: Tue Jan 08, 2008 6:44 pm Post subject: RE:how to tell viewer to put in a number between 1 to 5, then press enter, then it gives out the number.
it is simple. Here is the syntax:
var number:int
proc repeat
put "Please enter a number from 1 to 5: " ..
get [number]
end repeat
proc display
put "The number you entered is", [number]
end display
Euphoracle
Posted: Tue Jan 08, 2008 6:45 pm Post subject: RE:how to tell viewer to put in a number between 1 to 5, then press enter, then it gives out the number.
syntax_error, you have a Syntax error :p
shakin cookie
Posted: Tue Jan 08, 2008 6:46 pm Post subject: RE:how to tell viewer to put in a number between 1 to 5, then press enter, then it gives out the number.
ya, because there are no real square brackets... im just putting them to show the variable.
syntax_error
Posted: Tue Jan 08, 2008 6:48 pm Post subject: Re: how to tell viewer to put in a number between 1 to 5, then press enter, then it gives out the number.
ahh ya i realized after i put submit
but then some one already replied to my post so couldnt edit
any mods want to delete me code?
this is what happens when you try mult tasking too much
shakin cookie
Posted: Tue Jan 08, 2008 6:53 pm Post subject: RE:how to tell viewer to put in a number between 1 to 5, then press enter, then it gives out the number.
im really sorry
Zampano
Posted: Tue Jan 08, 2008 6:57 pm Post subject: Re: how to tell viewer to put in a number between 1 to 5, then press enter, then it gives out the number.
The hilariousness of this thread is proportional to how confusing it is.
Not only do you have a syntax error, you have an error which makes the program operate not how it should, though not because of broken syntax.
Sponsor Sponsor
syntax_error
Posted: Tue Jan 08, 2008 7:00 pm Post subject: Re: how to tell viewer to put in a number between 1 to 5, then press enter, then it gives out the number.
yes yes i see it all........
stupid book could put it down..... o well s/he got the idea of what to use i hope......
nonetheless ANY MODS remove the coding although the link is a gud idea to leave
cwlvc
Posted: Tue Jan 08, 2008 7:00 pm Post subject: Re: RE:how to tell viewer to put in a number between 1 to 5, then press enter, then it gives out the number.
shakin cookie @ Tue Jan 08, 2008 6:44 pm wrote:
it is simple. Here is the syntax:
var number:int
proc repeat
put "Please enter a number from 1 to 5: " ..
get [number]
end repeat
proc display
put "The number you entered is", [number]
end display
lol, wait, i don't get this. so instead of the number what do i put.
because i need to program that will run. so in the run screen, the computer (me) will ask the view to "type in a number, then press enter". so after the viewer pressed enter, the computer(me) will then say "the number you inputed is ...) but all of this should happen in the screen after you press "run"
HeavenAgain
Posted: Tue Jan 08, 2008 7:06 pm Post subject: RE:how to tell viewer to put in a number between 1 to 5, then press enter, then it gives out the number.
Interestingly, this problem is VERY beginner, you simply have to know about variable, user input, output, if statement , and just maybe a simple loop (and the posts above explained more than detailed)
now looking at your other post you seem to have a great understand of them, and beyond
now, instead of feeding this person answers, lets ask, what is the problem?
Zampano
Posted: Tue Jan 08, 2008 7:15 pm Post subject: Re: how to tell viewer to put in a number between 1 to 5, then press enter, then it gives out the number.
That would have been ten times more smart and cool sounding if you hadn't mispelled 'understand(ing)'. :D
cwlvc
Posted: Tue Jan 08, 2008 7:15 pm Post subject: Re: RE:how to tell viewer to put in a number between 1 to 5, then press enter, then it gives out the number.
HeavenAgain @ Tue Jan 08, 2008 7:06 pm wrote:
Interestingly, this problem is VERY beginner, you simply have to know about variable, user input, output, if statement , and just maybe a simple loop (and the posts above explained more than detailed)
now looking at your other post you seem to have a great understand of them, and beyond
now, instead of feeding this person answers, lets ask, what is the problem?
lol. when i copy and pasted the guy's post (which is pretty high tec for me ), it shows errors and i have no idea how to fix it.
cwlvc
Posted: Tue Jan 08, 2008 7:18 pm Post subject: Re: how to tell viewer to put in a number between 1 to 5, then press enter, then it gives out the number.
Zampano @ Tue Jan 08, 2008 7:15 pm wrote:
That would have been ten times more smart and cool sounding if you hadn't mispelled 'understand(ing)'.
people here are just as picky as people in hoopshype.com/forum. lol
i'm the guy known for his bad grammer, which gets picked on a lot.
HeavenAgain
Posted: Tue Jan 08, 2008 7:40 pm Post subject: RE:how to tell viewer to put in a number between 1 to 5, then press enter, then it gives out the number.
i dont mind, because i know i have a bad grammar/english but its all cool, but hey, at least i tried.. to sound cool , plus , if you could understand me, then its all good all good
cough..cough...
back to your problem.... in your other post, i noticed how you said "so to get what this is what i wrote for the first part(which i got correct, now i need to add in the twist)"
so simply i assumed you've written all your work, unless my english failed me again
i strongly suggest you go here and read "the basic" "If structures" and "Loops and For loops" this will get you quite far