#!/usr/bin/php $maxQuarters) { $maxQuarters = $quarters; echo "Amount '{$change}c' required adding another quarter, " . "now need '$maxQuarters'.\n" ; } if ($dimes > $maxDimes) { $maxDimes = $dimes; echo "Amount '{$change}c' required adding another dime, " . "now need '$maxDimes'.\n" ; } if ($nickels > $maxNickels) { $maxNickels = $nickels; echo "Amount '{$change}c' required adding another nickel, " . "now need '$maxNickels'.\n" ; } if ($pennies > $maxPennies) { $maxPennies = $pennies; echo "Amount '{$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 in one trip.\n" ; exit(0);