Sign in to follow this  
Zhme

Guessing game help

Recommended Posts

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"

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this