Question 1164209
<pre>
The other tutor's answer is correct, but he didn't really solve it.  He used
trial and error.  Here is how to solve it completely, using no trial and
error.  This is a "Diophantine equation", i.e. one that is solved only in
integers.
<pre>
D = dollars
C = cents
100D + C = amount check was for (in pennies)
100C + D = amount the teller gave Susan (in pennies)
100C + D - 350 = how much she had after spending $3.50 (in pennies)

The cents can only be a 1 or 2 digit number, and since they were switched
the dollars can also only be a 1 or 2 digit number. 

So 

{{{100C + D - 350 = 2(100D + C)}}}

That simplifies to

{{{98c = 199d + 350}}}

Solve for c

{{{c = (199/98)d + (350/98)}}}}

{{{c = (2&3/98)d + (3&56/98)}}}

{{{c = (2+3/98)d + (1+4/7)}}}

{{{c = 2d +expr(3/98)d + 3 + 4/7)}}}

Isolate the fractions on the right:

{{{c-2d-1=expr(3/98)d + 4/7}}}

The left side is an integer, so the right must also be
that same integer.  Let that integer be A

{{{c-2d-1=A}}}   
                 
{{{expr(3/98)d + 4/7=A}}}
{{{3d + 56 = 98A}}} 

Solve for d

{{{3d = 98A-56}}}

{{{d = expr(98/3)A - 56/3}}}

{{{d = (32&2/3)A - (18&2/3)}}}

{{{d = (32+2/3)A - (18+2/3)}}}

{{{d = 32A + expr(2/3)A - 18 - 2/3}}}

Isolate fractions on the right

{{{d-32A+18 = expr(2/3)A - 2/3}}}

The left side is an integer, so the right must also be
that same integer.  Let that integer be B.

{{{d-32A+18 = B}}}

{{{expr(2/3)A - 2/3=B}}}
{{{2A - 2 = 3B}}}

Solve for A

{{{2A = 3B + 2}}}

{{{A = expr(3/2)B + 1}}}

{{{A = (1&1/2)B + 1}}}

{{{A = (1+1/2)B + 1}}}

{{{A = B + expr(1/2)B + 1}}}

Isolate the fraction on the right:

{{{A - B - 1 = expr(1/2)B}}}

The left side is an integer, so 

The left side is an integer, so the right must also be
that same integer.  Let that integer be E (since we've
used c and d).

{{{A - B - 1 = E}}}

{{{expr(1/2)B=E}}}

{{{B=2E}}}

{{{A - 2E - 1 = E}}}

{{{A = 3E+1}}}

Substitute 3E+1 for A and 2E for B in

{{{d-32A+18 = B}}}

{{{d-32(3E+1)+18 = 2E}}}

{{{d-96E-32+18 = 2E}}}

{{{d-96E-14=2E}}}

{{{d=98E+14}}}

We can tell that E=0, otherwise d would be more than a 2 digit number.

So E=0 and d = 98(0)+14 = 14

Substitute 0 for E in

{{{A = 3E+1}}}

{{{A = 3(0)+1}}}

{{{A = 1}}}

Substitute 14 for d and A = 1 in

{{{c-2d-1=A}}}  

{{{c-2(14)-1 = 1}}}

{{{c-28-1=1}}}

{{{c=28+1+1}}}

{{{c=32}}}

Therefore d=14 dollars and c = 32 cents.

The check was for $14.32.

Checking:  $32.14 - $3.50 = $28.64 which is twice $14.32

Edwin</pre>