Difference between revisions of "Printing an Array"
From CompSciWiki
Line 1: | Line 1: | ||
{{1010PrAD|ProblemName=Printing an Array | {{1010PrAD|ProblemName=Printing an Array | ||
− | |Problem= | + | |Problem= This problem involves you printing out an array of integers using a <b>for loop</b>. You want to make an array of 10 integers with values you can hard code into the program. Remember that you can create an array of any type with hard coded values like this: |
+ | <pre> | ||
+ | int[] array = {1, 2, 3}; | ||
+ | </pre> | ||
Revision as of 12:01, 1 April 2010
Back to the Program-A-Day homepage
ProblemThis problem involves you printing out an array of integers using a for loop. You want to make an array of 10 integers with values you can hard code into the program. Remember that you can create an array of any type with hard coded values like this: int[] array = {1, 2, 3}; |
SideSectionTitle
An image or By Students section | |
---|---|---|
SolutionThe solution... | ||
CodeSolutionCode goes here. Please DO NOT put your code in <pre> tags! |