u will get practice in this assignment in the following areas in C/C++: • Writing a simple C++ program • Compiling and linking • Logical expressions • Simple arithmetic and/or assignment statements • Standard Input and output • Variable Declaration • Simple If statements • Simple while statement • Declaring constants and variables • Good programming practices Programming Specifications: 1. Your program must produc

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

You will get practice in this assignment in the following areas in C/C++:
• Writing a simple C++ program
• Compiling and linking
• Logical expressions
• Simple arithmetic and/or assignment statements
• Standard Input and output
• Variable Declaration
• Simple If statements
• Simple while statement
• Declaring constants and variables
• Good programming practices

Programming Specifications:
1. Your program must produce the minimal bill and coin count.
2. Your program must accept values between 1 and 1,000,000 pennies. If a number is entered outside that range your program should continue to ask for a valid number.
3. No Global Variables BUT your program must use global constants.
4. You must use declared constants in your program and not literal values.
5. Only print out non-zero values.. So, if there are no Five’s ….then don’t print zero fives.

Design Considerations/Algorithms

To see if you need to issue 100 dollar bills you divide the amount of pennies by the number of pennies in a 100 dollar bill. You should make this a constant in your program along with the number of pennies in the other demoninations. Remember to keep track of the number of pennies remaining after each denomination.

Divide the number of pennies by the amount of pennies in a 100, keep track of that number and the remainder.

Take the reminder from the 100's calculation and divide by the number of pennies in a 50's. Keep track of the number and the remainder.

Take the reminder from the 50's calculation and divide by the number of pennies in a 20's. Keep track of the number and the remainder.

Take the reminder from the 20's calculation and divide by the number of pennies in a 10's. Keep track of the number and the remainder.

Take the reminder from the 10's calculation and divide by the number of pennies in a 5's. Keep track of the number and the remainder.

Take the reminder from the 5's calculation and divide by the number of pennies in a 1's. Keep track of the number and the remainder.

Take the reminder from the 1's calculation and divide by the number of pennies in a quarters. Keep track of the number and the remainder.

Take the reminder from the quarter's calculation and divide by the number of pennies in a dime. Keep track of the number and the remainder.

Take the reminder from the Dime's calculation and divide by the number of pennies in a nickel. Keep track of the number and the remainder.

That which is left over is the number of pennies.

Do not print out any value that is zero.

 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
ADT and Class
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-engineering and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY