concerning a cheque A man went into a bank to cash a check. In handling over the money the cashier, by mistake, gave him dollars for cents and cents for dollars. He pocketed the money without examining it and on the way home he spent a nickel. Later on examining it, he found that he had twice the amount of money written on the check.He had no money in his pocket before going to the bank. 
How can we solve this problem? I tried by solving it by making equations but it does not work. The answer is given as $31.63$ on which he received $63.31$ and spent a nickel. But other than guessing, is there any way to find the answer of this problem?

Well let the number of Dollars in the amount he should have got be $D$ and the number of Cents $C$.
He should have got $100D+C$. He actually got $100C+D$. After his spending spree he had $100C+D-5$ and this was equal to $200D+2C$
Let's assume for the moment that $D\ge 5$ and $2C\lt 100$ so there are no carries.
Then we have $100C=200D$ or $C=2D$ equating the dollars, and $D-5=2C$ equating the cents, and that makes $3D=-5$ which is no solution.
So there has to be a carry. Let's assume now that $2C\ge 100, D\ge 5$
That gives us $C=2D+1$ for the dollars, and $D-5=2C-100=2(2D+1)-100$ for the cents, from which we obtain $D=31, C=63$ and check that $2C\ge 100$ as required.
The cases with $D\lt 5$ can be. checked similarly.
