Ok, now you are not changing cid
anymore! That wasn’t an issue with the two tests I think.
Let’s see, one time that 19 failed it had these values:
cid = [["PENNY",0.69],["NICKEL",0.95],["DIME",1.6],["QUARTER",2.75],["ONE",2],["FIVE",0],["TEN",20],["TWENTY",0],["ONE HUNDRED",0]];
price = 52.01;
and 80
for the #cash
element.
It gives Status: CLOSED TEN: $20 ONE: $2 QUARTER: $0.75 DIME: $0.2 PENNY: $0.04
which is not the same as the cid
.
A failure for 13:
cid = [["PENNY",0.18],["NICKEL",0.55],["DIME",1.5],["QUARTER",2.25],["ONE",9],["FIVE",10],["TEN",40],["TWENTY",140],["ONE HUNDRED",1300]];
price = 66.67;
and for #cash
, 90.
The output is Status: OPEN TWENTY: $20 ONE: $3 QUARTER: $0.25 NICKLE: $0.05 PENNY: $0.03
, total is $23.33
Read carefully the words in the output to find why it fails.