Ch2_Make Change

# Ch2_Make Change - Program Make Change Given any amount of...

This preview shows pages 1–2. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: //************************************************************ // Program Make Change: Given any amount of change expressed // in cents, this program computes the number of half-dollars, // quarters, dimes, nickels, and pennies to be returned, // returning as many half-dollars as possible, then quarters, // dimes, nickels, and pennies in that order. //************************************************************ //header file #include <iostream> using namespace std; //named constants const int HALFDOLLAR = 50; const int QUARTER = 25; const int DIME = 10; const int NICKEL = 5; int main() { //declare variable int change; //Statements: Step 1 Step 12 cout << "Enter change in cents: "; //Step 1 cin >> change; //Step 2...
View Full Document

## This note was uploaded on 03/08/2011 for the course CSIT 139 taught by Professor Duzut during the Spring '11 term at Los Angeles City College.

### Page1 / 2

Ch2_Make Change - Program Make Change Given any amount of...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online