Difference between revisions of "Summing arrays"

From CompSciWiki
Jump to: navigation, search
Line 1: Line 1:
 
{{1010PrAD|ProblemName=Create a Grocery List
 
{{1010PrAD|ProblemName=Create a Grocery List
  
|Problem=Create a grocery list. Prompt the user for the number of items and the quantity. Then print the list of items.<br><br>
+
|Problem=
 +
Write a method that takes an array of numbers are returns the sum. This can be used for the upcoming problems this week.
 +
<br><br>
  
 
Example Output<br>
 
Example Output<br>
Line 9: Line 11:
 
|SideSectionTitle=More with Arrays
 
|SideSectionTitle=More with Arrays
 
|SideSection=
 
|SideSection=
[[Image:Wiki_method01.jpg|float]]
+
[[Image:Wiki_method01.jpg|center]]
  
  

Revision as of 12:47, 6 April 2010

Back to the Program-A-Day homepage

Problem

Write a method that takes an array of numbers are returns the sum. This can be used for the upcoming problems this week.

Example Output


 

More with Arrays

Wiki method01.jpg

Solution

Something somethings

Code

Solution Code

Back to the Program-A-Day homepage