Anyone up for a money riddle?

jimbob200521

Diamond Member
Apr 15, 2005
4,108
29
91
There were 53 coins in the jar, all dimes and quators and it added up to $10.40... How many of each coins are there?

There is a field with horses and flamingos, there are 30 heads im the field and 94 legs... How many of each animal?
 

mugs

Lifer
Apr 29, 2003
48,920
46
91
.25x + .10y = 10.4
x + y = 53

Solve the bottom equation for x or y, replace y or x in the top equation with that, then solve for the one variable you have left in the top equation.
 

manlymatt83

Lifer
Oct 14, 2005
10,051
44
91
mj$ sh blah.sh | grep 1040
Total with 2 quarters AND 99 dimes: 1040
Total with 4 quarters AND 94 dimes: 1040
Total with 6 quarters AND 89 dimes: 1040
Total with 8 quarters AND 84 dimes: 1040
Total with 10 quarters AND 79 dimes: 1040
Total with 12 quarters AND 74 dimes: 1040
Total with 14 quarters AND 69 dimes: 1040
Total with 16 quarters AND 64 dimes: 1040
Total with 18 quarters AND 59 dimes: 1040
Total with 20 quarters AND 54 dimes: 1040
Total with 22 quarters AND 49 dimes: 1040
Total with 24 quarters AND 44 dimes: 1040
Total with 26 quarters AND 39 dimes: 1040
Total with 28 quarters AND 34 dimes: 1040
Total with 30 quarters AND 29 dimes: 1040
Total with 32 quarters AND 24 dimes: 1040
Total with 34 quarters AND 19 dimes: 1040
Total with 36 quarters AND 14 dimes: 1040
Total with 38 quarters AND 9 dimes: 1040
Total with 40 quarters AND 4 dimes: 1040
 

jimbob200521

Diamond Member
Apr 15, 2005
4,108
29
91
Originally posted by: mjuszczak
mj$ sh blah.sh | grep 1040
Total with 2 quarters AND 99 dimes: 1040
Total with 4 quarters AND 94 dimes: 1040
Total with 6 quarters AND 89 dimes: 1040
Total with 8 quarters AND 84 dimes: 1040
Total with 10 quarters AND 79 dimes: 1040
Total with 12 quarters AND 74 dimes: 1040
Total with 14 quarters AND 69 dimes: 1040
Total with 16 quarters AND 64 dimes: 1040
Total with 18 quarters AND 59 dimes: 1040
Total with 20 quarters AND 54 dimes: 1040
Total with 22 quarters AND 49 dimes: 1040
Total with 24 quarters AND 44 dimes: 1040
Total with 26 quarters AND 39 dimes: 1040
Total with 28 quarters AND 34 dimes: 1040
Total with 30 quarters AND 29 dimes: 1040
Total with 32 quarters AND 24 dimes: 1040
Total with 34 quarters AND 19 dimes: 1040
Total with 36 quarters AND 14 dimes: 1040
Total with 38 quarters AND 9 dimes: 1040
Total with 40 quarters AND 4 dimes: 1040

:Q
 

aleckz

Golden Member
Jan 3, 2004
1,032
0
76
Originally posted by: mjuszczak
mj$ sh blah.sh | grep 1040
Total with 2 quarters AND 99 dimes: 1040
Total with 4 quarters AND 94 dimes: 1040
Total with 6 quarters AND 89 dimes: 1040
Total with 8 quarters AND 84 dimes: 1040
Total with 10 quarters AND 79 dimes: 1040
Total with 12 quarters AND 74 dimes: 1040
Total with 14 quarters AND 69 dimes: 1040
Total with 16 quarters AND 64 dimes: 1040
Total with 18 quarters AND 59 dimes: 1040
Total with 20 quarters AND 54 dimes: 1040
Total with 22 quarters AND 49 dimes: 1040
Total with 24 quarters AND 44 dimes: 1040
Total with 26 quarters AND 39 dimes: 1040
Total with 28 quarters AND 34 dimes: 1040
Total with 30 quarters AND 29 dimes: 1040
Total with 32 quarters AND 24 dimes: 1040
Total with 34 quarters AND 19 dimes: 1040
Total with 36 quarters AND 14 dimes: 1040
Total with 38 quarters AND 9 dimes: 1040
Total with 40 quarters AND 4 dimes: 1040

I think everyone just got raped by this script.
 

dullard

Elite Member
May 21, 2001
26,074
4,725
126
Originally posted by: jimbob200521
There is a field with horses and flamingos, there are 30 heads im the field and 94 legs... How many of each animal?
Do all animals have all of their legs? And do flamingos count as 2 legs if they are standing on one?
 

VTHodge

Golden Member
Aug 3, 2001
1,575
0
0
Originally posted by: jimbob200521
There is a field with horses and flamingos, there are 30 heads im the field and 94 legs... How many of each animal?

17 horses, 13 flamingos
 

manlymatt83

Lifer
Oct 14, 2005
10,051
44
91
mj$ sh blah.sh | grep 1040 | grep 53
Total with 34 quarters AND 19 dimes WITH 53 total coins: 1040
mj$

There is only one answer

Here is the shell script:

#!/bin/sh

QUARTERS=0
DIMES=0

while [ "$QUARTERS" -lt "100" ]
do
DIMES=0
QUARTERS=`expr $QUARTERS + 1`
while [ "$DIMES" -lt "100" ]
do
DIMES=`expr $DIMES + 1`;
TOTAL_DIMES=`expr $DIMES \* 10`
TOTAL_QUARTERS=`expr $QUARTERS \* 25`
TOTAL=`expr $TOTAL_DIMES + $TOTAL_QUARTERS`
TOTALCOINS=`expr $QUARTERS + $DIMES`
echo "Total with $QUARTERS quarters AND $DIMES dimes WITH $TOTALCOINS total coins:$TOTAL"
done
done
 

krotchy

Golden Member
Mar 29, 2006
1,942
0
76
Alot easier way to do it

Total with 53 quarters = 13.25
Subtract 10.40 = 2.85
Every quarter -> Dime = -.15 so 2.85/.15 = 19 Dimes -> 34 quarters (53-19)

So 19 dimes, 34 quarters
 

krotchy

Golden Member
Mar 29, 2006
1,942
0
76
Same for horse, flamingo (horse = 4, flamingo =2 I assume, since flamingo could be on 1 leg if it wanted)

30 horses = 120 legs - 94 = 26/2 = 13 flamingos

so 13 flamingo, 17 horses...