3. Create a script that will find the average of {-100, 97, 83, 21, -50, 20, 101, 30}. [THE USER SHOULD BE PROMPTED TO TYPE IN THE SIZE OF ARRAY. THEN, EACH FOLLOWING NUMBER THAT USER TYPES IN SHOULD BE STORED IN THIS ARRAY. Whole computation has to be done by accessing elements in the array.) USER PROMPTING TO ASK THE SIZE OF ARRAY HAS TO BE DONE IN main(). COMPUTATION HAS TO BE DONE WITHIN THE USER DEFINED FUNCTION. THE FINAL VALUE SHOULD BE RETURNED TO THE main() function. THE DISPLAY OF THE RESULT SHOULD TAKE PLACE WITHIN main().
3. Create a script that will find the average of {-100, 97, 83, 21, -50, 20, 101, 30}. [THE USER SHOULD BE PROMPTED TO TYPE IN THE SIZE OF ARRAY. THEN, EACH FOLLOWING NUMBER THAT USER TYPES IN SHOULD BE STORED IN THIS ARRAY. Whole computation has to be done by accessing elements in the array.) USER PROMPTING TO ASK THE SIZE OF ARRAY HAS TO BE DONE IN main(). COMPUTATION HAS TO BE DONE WITHIN THE USER DEFINED FUNCTION. THE FINAL VALUE SHOULD BE RETURNED TO THE main() function. THE DISPLAY OF THE RESULT SHOULD TAKE PLACE WITHIN main().
C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter12: Points, Classes, Virtual Functions And Abstract Classes
Section: Chapter Questions
Problem 29SA
Related questions
Question
Please follow the directions. Use C only.
![3. Create a script that will find the average of {-100, 97, 83, 21,
-50, 20, 101, 30}.
[THE USER SHOULD BE PROMPTED TO TYPE IN THE
SIZE OF ARRAY. THEN, EACH FOLLOWING NUMBER
THAT USER TYPES IN SHOULD BE STORED IN THIS
ARRAY. Whole computation has to be done by accessing
elements in the array.)
USER PROMPTING TO ASK THE SIZE OF ARRAY HAS TO
BE DONE IN main(). COMPUTATION HAS TO BE DONE
WITHIN THE USER DEFINED FUNCTION. THE FINAL
VALUE SHOULD BE RETURNED TO THE main() function.
THE DISPLAY OF THE RESULT SHOULD TAKE PLACE
WITHIN main().](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fea15a020-4c3d-4465-ab98-9243852d0f9f%2Fe650a237-01ce-4c08-88a7-d9860213ae0c%2Fg2e5y2_processed.jpeg&w=3840&q=75)
Transcribed Image Text:3. Create a script that will find the average of {-100, 97, 83, 21,
-50, 20, 101, 30}.
[THE USER SHOULD BE PROMPTED TO TYPE IN THE
SIZE OF ARRAY. THEN, EACH FOLLOWING NUMBER
THAT USER TYPES IN SHOULD BE STORED IN THIS
ARRAY. Whole computation has to be done by accessing
elements in the array.)
USER PROMPTING TO ASK THE SIZE OF ARRAY HAS TO
BE DONE IN main(). COMPUTATION HAS TO BE DONE
WITHIN THE USER DEFINED FUNCTION. THE FINAL
VALUE SHOULD BE RETURNED TO THE main() function.
THE DISPLAY OF THE RESULT SHOULD TAKE PLACE
WITHIN main().
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Knowledge Booster
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.Recommended textbooks for you
![C++ Programming: From Problem Analysis to Program…](https://www.bartleby.com/isbn_cover_images/9781337102087/9781337102087_smallCoverImage.gif)
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
![C++ Programming: From Problem Analysis to Program…](https://www.bartleby.com/isbn_cover_images/9781337102087/9781337102087_smallCoverImage.gif)
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning