#include using namespace std; int main() { //Intitialize totalCents to 0 int totalCents {0}; // Get input from the user cout << "Enter the total amount in cents: "; cin >> totalCents; // Check if input was successful if (!cin) { cout << "Invalid input!" << endl; return 1; // Exit with error code } // Compute dollars and cents dollars = totalCents / 100; // Quotient: total dollars cents = totalCents % 100; // Remainder: leftover cents // Output the result cout << "That's " << dollars << " dollars and " << cents << " cents." << endl; return 0; }