The goal for this exercise is to make sure that you can create a simple, integer array, and both put values into it, and get values back out of it.
What you need to do to prepare for this exercise:
In the starter project, add code to the Array_Basics
class, so that the RunExercise
method does the
following:
Declare an array of 10 integers
Use a for
loop to initialize the array with user input from the keyboard.
Display the contents of the array to the screen using another for
loop.
Once you’ve done that, build on your existing code by:
Creating a second array, with 5 integers, and try initializing the array with 5 integer values directly inside the declaration (i.e., set things up so that when you create the array, it will store values such as 1, 10, 100, 1000, 10000).These integer values will be chosen by you when you write the program (i.e., the user will not input the values for the second array).
Print out this second array, too