Difference between revisions of "Creating a grocery list"

From CompSciWiki
Jump to: navigation, search
Line 14: Line 14:
  
 
|Code=
 
|Code=
 
+
<pre>
 +
something
 +
</pre>
  
 
}}
 
}}

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