Ch2_Make Change -...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon
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

Page1 / 2

Ch2_Make Change -...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online