Everything works as intended except one minor screwy line of code. The very last line that calculates the fee. For example if you type in 105 it says you entered $1.05, which is good, then it calculates the fee for the transaction which gives you $0.93555 as your take-home pay. I only want it to display up to the hundredths place no matter the dollar amount, not the hundred thousandth place. So it should display $0.93 because that's realistic. Note that depending on the integer you enter at the start, sometimes the decimal is placed correctly and sometimes the thousandth place is displayed, it's being screwy like that an I am not sure what to fix.
#include <iostream>
using namespace std;
int main() {
int cents;
double total;
cout<<"Enter total amount of coins (whole number): "; //Enter any whole number
cin>>total;
cents = total;
cout<<"You entered " << cents / 25 << " quarters";
cents = cents % 25;
cout<<", " << cents / 10 << " dimes";
cents = cents % 10;
cout<<", " << cents / 5 << " nickels";
cents = cents % 5;
cout<<", " << cents / 1 <<" pennies.";
cents = cents % 1;
cout<<" That is " << "$" <<total / 100 << "."<<endl; //Converting to dollar amount
cout<<"After the fee, you take home " << "$" << (total - (0.109 * total)) / 100 << "."; //What you're left with after the fee