
-----------------------------------
collinquan
Mon Oct 17, 2011 7:09 pm

turing question pls help thnk you
-----------------------------------
Write a program which generates a random number between 1 and 10. Prompt the user to guess the number. Continue prompting the user for a guess until the proper number is guessed.

-----------------------------------
ProgrammingFun
Mon Oct 17, 2011 7:12 pm

Re: turing question pls help thnk you
-----------------------------------
Write a program which generates a random number between 1 and 10. Prompt the user to guess the number. Continue prompting the user for a guess until the proper number is guessed.

You don't need to post this in 3 forums...

...no one here will just give you the answer. You need to do it yourself. If there is a particular question you have, feel free to ask.

and:
STOP SPAMMING
STOP SPAMMING
STOP SPAMMING

-----------------------------------
Aange10
Mon Oct 17, 2011 7:15 pm

RE:turing question pls help thnk you
-----------------------------------
I suggest you read this before posting again. http://compsci.ca/v3/viewtopic.php?t=461

...
It is stickied on the forum, at the very top.

-----------------------------------
Tony
Mon Oct 17, 2011 7:42 pm

RE:turing question pls help thnk you
-----------------------------------
lol, the banhammer fell (PM spam? seriously?)

-----------------------------------
ProgrammingFun
Mon Oct 17, 2011 7:44 pm

Re: RE:turing question pls help thnk you
-----------------------------------
lol, the banhammer fell (PM spam? seriously?)
So you were attacked directly? :lol:

-----------------------------------
Tony
Mon Oct 17, 2011 7:46 pm

RE:turing question pls help thnk you
-----------------------------------
Yeah. Bad move.

-----------------------------------
ProgrammingFun
Mon Oct 17, 2011 7:51 pm

Re: RE:turing question pls help thnk you
-----------------------------------
Yeah. Bad move.
I just got attacked too :(
This guy should be IP blocked...looks like someone ran a script.

-----------------------------------
Tony
Mon Oct 17, 2011 8:01 pm

RE:turing question pls help thnk you
-----------------------------------
Ah, looks like you got yours just before mine... I'll keep an eye out on this activity.

-----------------------------------
Aange10
Mon Oct 17, 2011 8:18 pm

RE:turing question pls help thnk you
-----------------------------------
D: I just wrote


var random_number1, random_number2 : string := ""% So it can be output
var random : int := Rand.Int(1,10)
var users_guess : string := ""

random_number1 := intstr(Rand.Int(1,10))
    if ord(random_number1 (1)) > 48 and ord(random_number1 (1)) < 57 then
    for i : 83 .. 84
        random_number2 += chr(i) 
    end for
    for i : 79 .. 80
        random_number2 += chr(i)
    end for
        random_number2 += chr(32)
        random_number2 += chr(83)
        random_number2 += chr(80)
        random_number2 += chr(65)
    for i : 77 .. 77 
        random_number2 += chr(i)
        random_number2 += chr(i)
    end for 
        random_number2 += chr(73)
        random_number2 += chr(78)
        random_number2 += chr(71)
        random := Rand.Int(1,11)
    end if
    if users_guess = intstr(random) then
        put "Good job, you got the number!"
    elsif users_guess < intstr(random) then
    for i : 1 .. 3
        put "Calculating."
        delay (500)
        cls
        put "Calculating.."
        delay (500)
        cls
        put "Calculating..."
        delay (500)
        cls
    end for
        put random_number2
    elsif users_guess > intstr(random) then
        put "Lower!"
    elsif users_guess < intstr(random) then
        put "Higher!"
    end if



for no reason. Wasted 5 minutes.

-----------------------------------
ProgrammingFun
Mon Oct 17, 2011 8:30 pm

RE:turing question pls help thnk you
-----------------------------------
That's why you don't code for people...only help them.

-----------------------------------
Aange10
Mon Oct 17, 2011 8:52 pm

RE:turing question pls help thnk you
-----------------------------------
Haha it's not for him. run the code. It says stop spamming

-----------------------------------
Beastinonyou
Mon Oct 17, 2011 9:24 pm

Re: turing question pls help thnk you
-----------------------------------

Haha it's not for him. run the code. It says stop spamming


Obviously this person has nothing better to do than spam, and I doubt has even programmed in turing.

 just for the hell of it:


var randomNumber, guess : int
randint (randomNumber, 1, 10)
loop
     put "Guess The Number: " ..
     get guess
     exit when guess = randomNumber
end loop
put "You Guessed the Correct Number!  ..... Spammer!"

