I need help with a brain teaser. I know the answer, but I’d like to know the algorithm to achieve it without resorting to brute force–i.e., writing a program Here goes:
A bank customer (let’s just say it’s a gal) is cashing a check.
The dyslexic teller gives her dollars for cents and cents for dollars.
The customer unwittingly drops a nickel.
When she gets home, she opens her purse and finds that she has exactly twice as much as she was supposed to get.
How much was the check?
The answer is $31.63. But there must be an easier way to solve for the equation than what I used.