PROGRAM_1 - CS 31 Introduction to Computer Science I UCLA Winter 2010 CS 33 Project 1 John A Rohr January 6 2010 Winter 2010 Project 1 Program Page

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

View Full Document Right Arrow Icon
Winter 2010: Project 1 Program Page 1 // UCLA Winter 2010 // CS 33 Project 1 // John A. Rohr // January 6, 2010 // // // This program prompts for and accepts grocery list items until an empty // item description is entered. Then the program reports the number of // different items and the total count of all items to be purchased. // // // Example Execution // // GROCERY LIST // // Enter an item: Cookies // Enter the quantity:12 // // Enter an item: Candy // Enter the quantity:4 // // Enter an item: Soda Pop // Enter the quantity:6 // // Enter an item: // // Number of different items: 3 // Total number of items to purchase:22 // // End. #include <iostream> #include <string> using namespace std; int main() { int diff; // Total number of different items int all; // Total number of items to be purchased int quantity; // Quantity for current item string description; // Item description // Display a title cout << "GROCERY LIST" << endl; // Display a blank line
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/08/2010 for the course COM SCI 31 taught by Professor Kinsey during the Spring '98 term at UCLA.

Page1 / 2

PROGRAM_1 - CS 31 Introduction to Computer Science I UCLA Winter 2010 CS 33 Project 1 John A Rohr January 6 2010 Winter 2010 Project 1 Program Page

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