Difference between revisions of "Creating a grocery list"

From CompSciWiki
Jump to: navigation, search
Line 13: Line 13:
 
|Solution= To solve this prompt the user for the number of items for the list. Create an array of strings to store the list items. Then prompt the user for the items.
 
|Solution= To solve this prompt the user for the number of items for the list. Create an array of strings to store the list items. Then prompt the user for the items.
  
|Code=
+
|Code=class GroceryList
 
<pre>
 
<pre>
 
something
 
something

Revision as of 12:14, 1 April 2010

Back to the Program-A-Day homepage

Problem

Write a program to create a grocery list.

 

float
Taken from http://www.flickr.com/photos/daniello/565304023/

An image or By Students section

Solution

To solve this prompt the user for the number of items for the list. Create an array of strings to store the list items. Then prompt the user for the items.

Code

SolutionCode goes here. Please DO NOT put your code in <pre> tags!

Back to the Program-A-Day homepage