I wrote a program and have problem with results. When I'm enter some numbers, for example 43.01, conditional operator ignores that statement is true and gives me a wrong output ( 0 cents ), where is the problem?
int main()
{
    double money_amount;
    cout << "Enter money amount. For example: 3.59\n";
    cin >> money_amount;
    int dollar_amount = money_amount;
    double cent_amount = money_amount - dollar_amount;
    cout << cent_amount << "\n"; // to make sure that there is 0.01
    dollar_amount == 1 ? cout << "You have 1 dollar\n" : cout << "You have " << dollar_amount << " dollars\n";
    cent_amount == 0.01 ? cout << "You have 1 cent\n" : cout << "You have " << floor(cent_amount*100) << " cents\n"; // here is the problem
}
