I\'m asking the user to input 5 numbers and store it into an array so I can send the values in a method and subtract 5 numbers from each array. When I use the:
You initialize the array first
int[] val = new int[5];
and then when you do a for loop:
for (int i=0; i
Hint: To send the array values from main to the method, just look at how static void main
is formed:
static void Main(string[] args)
Meaning main is accepting a string array of of console arguments.