Click here to Skip to main content
Licence 
First Posted 8 Oct 2003
Views 91,586
Bookmarked 26 times

A magic trick

By | 12 Nov 2003 | Article
A magic trick that will astound you!

Introduction

While not a tool per se, this little "magic" program was inspired by a Web site that a friend sent me. I thought it neat enough to try and figure out how they did it. Within just a few minutes, a co-worker and I, with the help of a big whiteboard, figured out a solution. The result is a wizard-based dialog program that attempts to read your mind!

How to use

Following the on-screen instructions, it's self explanatory. Basically, you're going to jot down some numbers, scramble 'em up a bit, and the program will attempt to guess one of your numbers. If it guesses wrong, drop me a line and tell me the numbers you used. I may not have accounted for all exceptions.

The program is not fool-proof. It is possible to give it bogus numbers, and it will, in turn, give you a bogus answer. Making it totally fool-proof would have over-complicated the code, which I did once already.

The solution

I chose not to put a solution to the puzzle here, because then it would be way too easy for the casual Web surfer to find it, thus ruining any fun they might have had trying to figure it out the old fashioned way - using their head!

A solution is, however, in the code itself, and is very easy to comprehend (even easier when someone shows you how to simplify your math!). I would challenge you to try the program, or the referenced Web site, a few times before diving right in and looking at the solution.

References

Improvements

The UI is a bit blah, but since my intent was not a flashy program, it matters not. One of these days, I might be so inclined to dress it up a bit. If you like drawing and GDI type stuff, feel free.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

DavidCrow

Software Developer (Senior)
Pinnacle Business Systems
United States United States

Member


The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.
 
HTTP 404 - File not found
Internet Information Services


Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
GeneralCompile error Pinmemberalrsds1:24 8 Sep '09  
QuestionRe: Compile error PinmvpDavidCrow6:32 8 Sep '09  
AnswerRe: Compile error [modified] Pinmemberalrsds14:19 8 Sep '09  
QuestionRe: Compile error PinmvpDavidCrow16:54 8 Sep '09  
AnswerRe: Compile error Pinmemberalrsds5:32 9 Sep '09  
Generaldidn't work Pinmemberdonperry10:58 27 Jan '07  
GeneralRe: didn't work PinmvpDavidCrow2:46 29 Jan '07  
GeneralModified Code PinmemberRay Keller15:39 31 Dec '04  
Generalremember the ABACUS!! PinmemberRay Keller8:29 31 Dec '04  
GeneralYour works cause good discussions. PinmemberLAT20:17 14 Nov '03  
GeneralA Better Trick PinmemberDanYELL13:39 14 Nov '03  
GeneralRe: A Better Trick PinmemberUltraJoe1:41 18 Nov '03  
GeneralMore magic PinmemberMr Scotty1:04 14 Nov '03  
GeneralRe: More magic PinmemberDavidCrow8:45 14 Nov '03  
GeneralThis is NOT magic. PinmemberWREY19:33 13 Nov '03  
GeneralRe: This is NOT magic. Pinmemberpistarino21:45 13 Nov '03  
GeneralRe: This is NOT magic. PinmemberWREY6:27 14 Nov '03  
GeneralRe: This is NOT magic. PinmemberDavidCrow8:52 14 Nov '03  
GeneralRe: This is NOT magic. PinmemberWREY15:04 14 Nov '03  
GeneralOverly complex math PinmemberJohn Plsek4:06 10 Oct '03  
GeneralFido puzzle discussion PinmemberSteve Mayfield20:38 9 Oct '03  
GeneralRe: Fido puzzle discussion PinmemberDavidCrow2:26 10 Oct '03  
GeneralRe: Fido puzzle discussion PinmemberJohn Plsek4:38 10 Oct '03  
GeneralThis is a nice application. Pinmember73Zeppelin16:00 9 Oct '03  
GeneralRe: This is a nice application. PinmemberJohn Plsek4:44 10 Oct '03  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Mobile
Web04 | 2.5.120517.1 | Last Updated 13 Nov 2003
Article Copyright 2003 by DavidCrow
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid