#include #include /* Dan Bennett, Homework 6 Get the price - pennies - flakies - buckies Get the paid - pennies - flakies - buckies convert price to all pennies, (penniesTotalPrice) penniesTotalPrice = penniesPrice + flakiesPrice * PENNIES_PER_FLAKIE + buckiesPrice * PENNIES_PER_BUCKIE reduce price to optimal values penniesPrice = penniesTotalPrice buckiesPrice = penniesPrice / PENNIES_PER_BUCKIE penniesPrice = penniesPrice % PENNIES_PER_BUCKIE flakiesPrice = penniesPrice / PENNIES_PER_FLAKIE penniesPrice = penniesPrice % PENNIES_PER_FLAKIE print price convert paid to all pennies, (penniesTotalPaid) reduce paid to optimal values print price compute change penniesTotalChange = penniesTotalPaid - penniesTotalPrice reduce change to optimal values print change */ using namespace std; const int PENNIES_PER_FLAKIE{11}; const int FLAKIES_PER_BUCKIE{7}; const int PENNIES_PER_BUCKIE{PENNIES_PER_FLAKIE * FLAKIES_PER_BUCKIE}; int main() { int penniesPrice{0}, flakiesPrice{0}, buckiesPrice{0}; int penniesTotalPrice{0}; cout << "Enter the pennies in price "; cin >> penniesPrice; cout << "Enter the flakies in price "; cin >> flakiesPrice; cout << "Enter the buckies in price "; cin >> buckiesPrice; penniesTotalPrice = penniesPrice + flakiesPrice * PENNIES_PER_FLAKIE + buckiesPrice * PENNIES_PER_BUCKIE; return 0; }