Difference between revisions of "Print Array"
From CompSciWiki
Line 1: | Line 1: | ||
− | {{1010PrAD|ProblemName= | + | {{1010PrAD|ProblemName=Print Array |
− | |Problem= The | + | |Problem= Write 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. | ||
+ | Example: | ||
+ | int[] n = {45,32,78,45,890,45,32}; | ||
+ | printArray(n); | ||
+ | Output:45,32,78,890,45,32 | ||
Revision as of 12:28, 30 March 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. Example: int[] n = {45,32,78,45,890,45,32}; printArray(n); Output:45,32,78,890,45,32 |
SideSectionTitle
An image or By Students section | |
---|---|---|
SolutionThe solution... | ||
CodeSolutionCode goes here. Please DO NOT put your code in <pre> tags! |