#!/usr/bin/php $maxquarters) { $maxquarters = $quarters; echo "Change '{$change}c' required adding another quarter, now need '$maxquarters'.\n"; } if ($dimes > $maxdimes) { $maxdimes = $dimes; echo "Change '{$change}c' required adding another dime, now need '$maxdimes'.\n"; } if ($nickels > $maxnickels) { $maxnickels = $nickels; echo "Change '{$change}c' required adding another nickel, now need '$maxnickels'.\n"; } if ($pennies > $maxpennies) { $maxpennies = $pennies; echo "Change '{$change}c' required adding another penny, now need '$maxpennies'.\n"; } } echo "You can pay any cent value with exact change if you have $maxquarters quarter(s), $maxdimes dime(s), $maxnickels nickel(s), and $maxpennies penn(y,ies).\n"; $quarters = $maxquarters * 25; $dimes = $maxdimes * 10; $nickels = $maxnickels * 5; $pennies = $maxpennies; $change = $quarters + $dimes + $nickels + $pennies; echo "That means you only ever need to carry {$change}c unless going to multiple locations on foot.\n"; exit(0);