Difference between revisions of "Print Array"
From CompSciWiki
Line 11: | Line 11: | ||
|SideSection= | |SideSection= | ||
− | [[Image: | + | [[Image:wiki_method01.jpg|float|267px]] |
<BR> | <BR> | ||
− | |||
Revision as of 11:55, 6 April 2010
Back to the Program-A-Day homepage
ProblemWrite a method which will take an array of ints as a parameter.
The method should print the elements of the array, separated by a comma.
|
SideSectionTitle | |
---|---|---|
SolutionTo solve this problem you need to use a for loop. Loop from 0 through all elements of the input array. At each iteration, print out the current array element and a comma. | ||
Code |