AskForNumbers Declare an integer array locally with the size of 200. Create a program that asks the user how many numbers the have. Use your getChoice) function from before. Make sure it does not exceed 200 as the locally declared array has the size of 200. Use a for loop and ask the user to enter each value that must be stored in the array. Use a second loop to display each number, and also determine the average of all values in the array. After the for loop, display the average of all numbers.

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter8: Arrays
Section: Chapter Questions
Problem 10RQ
icon
Related questions
Question

I am struggling on storing numbers from the getChoice () function into an array and pulling it back into main. 

Programming with C. 

Thank you. 

AskForNumbers
Declare an integer array locally with the size of 200. Create a program that asks the user how many numbers the have. Use your
getChoice) function from before. Make sure it does not exceed 200 as the locally declared array has the size of 200.
Use a for loop and ask the user to enter each value that must be stored in the array.
Use a second loop to display each number, and also determine the average of all values in the array.
After the for loop, display the average of all numbers.
Transcribed Image Text:AskForNumbers Declare an integer array locally with the size of 200. Create a program that asks the user how many numbers the have. Use your getChoice) function from before. Make sure it does not exceed 200 as the locally declared array has the size of 200. Use a for loop and ask the user to enter each value that must be stored in the array. Use a second loop to display each number, and also determine the average of all values in the array. After the for loop, display the average of all numbers.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Passing Array as Argument
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning