Jump to content
Sign in to follow this  
cppman

No If Statements...

Recommended Posts

cppman

Okay, you know when u go through a tutorial for c++, or take a class... their is usually a little assignment where you have to create a program that you input your birthday and it will give you your zodiac sign...

except, it does'nt use any IF STATEMENTS at all...

is their any way to do this in autoit?

an example?

Share this post


Link to post
Share on other sites
greenmachine

Does it use any conditional statements at all? If not, that's suprising. If so, they're probably switch statements.

Share this post


Link to post
Share on other sites
CyberSlug

One possibility....

Input: Birthday. There are 366 possible values (remember leap years)

Output: Zodiac. There are 12 possible values.

Worst case, you could write a function that maps each possible input to its output. A lookup table, so to speak....

That should be enough of a hint.


Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.