Write a simple C++ program to implement the following algorithm. A program is required to prompt a user for a value in cents then calculate and display the number of thousands of dollars, hundreds,...


Write a simple C++ program to implement the following algorithm.
A program is required to prompt a user for a value in cents then calculate and display the
number of thousands of dollars, hundreds, dollars, and cents.
Example output
Enter a value in cents> 123456
That is: 1 thousand 2 hundred 34 dollars and 56 cents
Pseudocode Analyze_Cents
Prompt for value
Get value
thousands = value divided by (THOUSAND_CENTS)
remainder = value % THOUSAND_CENTS
hundreds = remainder / HUNDRED_CENTS
remainder = remainder % HUNDRED_CENTS
dollars = remainder / DOLLAR_CENTS
cents = remainder % DOLLAR_CENTS


Display thousands, hundreds, dollars, cents
END



Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here