Question: Write a program that does the following In your main method ask the user how many data points they want to enter into an int

Write a program that does the following In your main method ask the user how many data points they want to enter into an int array Then add a for loop that will run for the amount of times that the user told us In the for loop, you will ask the user to enter an int to add to your array until they have entered all data points into the array. The program should follow the format of "Please enter the [CURRENT NUMEBR OF DATAPOINT] number: " Once the for loop has finished, you will then print out the sum in the main method by making a method to get the sum of the array. The method should take an int array as its paramater and it can use a for loop or a while loop to get the sum. If you want a challege, get the sum using a while loop.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!