+0  
 
0
372
1
avatar

 

George is about to get a certain amount of change less than one dollar from the cash register. If he gets the most quarters possible and the rest in pennies, he would need to receive 3 pennies to meet the amount. If he gets the most dimes possible and the rest in pennies, he would need to receive 8 pennies to meet the amount. What is the sum, in cents, of the possible amounts of change that he is trying to get?

 Oct 2, 2020
 #1
avatar
0

a=1; b=1;d=25*a +3; if(d==10*b +8, goto4, goto5);printd, a, b; a++;if(a<100, goto2, 0);a=1;b++;if(b<100, goto2, discard=0; 

 

OUTPUT: There are 2 amounts possible as follows:

 

28 cents from 1 quarter + 3 cents. Or, from 2 dimes + 8 cents.

 

78 cents from 3 quarters + 3 cents. Or, from 7 dimes + 8 cents.

 Oct 2, 2020

2 Online Users