Question
a) Write a program that will allow user to enter five different scores for a student. Store the scores in a five-element array named scores.
a) Write a program that will allow user to enter five different scores for a student. Store the scores in a five-element array named scores. Then display back the content of the array.
b) Modified your answer for question 1. In this version, the main function passes the calories array to a program-defined void function named displayArray, whose task is to display the contents of the array.
3) Modified your answer for question 2. The additional function will be a value-returning function named getAverage. The function will calculate the average scores of the student and then return the result to the main function.
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