Coding challenge

dunbarx at aol.com dunbarx at aol.com
Wed Jan 30 23:31:54 EST 2013


Mark:


on mouseup
  ask "Enter Value"
put it into temp
put "50,20,10,5,2,1" into coins
put 1 into tCount
repeat until temp = 0
  if item tCount of coins <= temp then
put item tCount of coins & "," after tChange
subtract item tCount of coins from temp
else
add 1 to tCount
end if
end repeat
answer tChange
end mouseup


Craig



More information about the use-livecode mailing list