Skip to main content
gamedev.net
🔒 Locked

Guessing game help

Started by Zhme 1 reply 1k views
Original Post
Zhme
Zhme
I'm programmin a guessing game on my 84 calc but its not working right can someone help me figure it out? Heres what i have so far... <-- noob at programming btw :ClrHome : :randInt(1,50)->X \\-> represents the sto> button : :If y\=x \\ \= is the not equal to symbol :Then :Repeat prgmGUESS :Input y :If Y=X :Then :Disp "You Win" : :Repeat prgmGUESS : :If Y<X :Then :Disp "A little Higher" : : : :If y>x :Then :Disp "A little Lower"
rip-off
rip-off
You say its not working right. The easiest way to get a good answer is to describe fully what you mean by this. If you see an error message, you should post it in full. If the program acts erratically, describe what it is doing.

At a glance, I will say that your use of case is inconsistent. You change from using x to X and y to Y every few lines. Unless the language is case-insensitive that won't work. If it is case insensitive, it is still a bad habit. It is hard to read.
Zhme
Zhme
When I run the program and test it out I enter in the variable and it ends the program saying Done, and its on my calculator i'm programming this so its all Capitals

:?9
Done

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.