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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started