Coding challenge

dunbarx at dunbarx at
Wed Jan 30 23:31:54 EST 2013


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
add 1 to tCount
end if
end repeat
answer tChange
end mouseup


More information about the use-livecode mailing list