Challenge: Calculate the Average Marks of a Class
Test your knowledge by solving a challenge in this lesson.
We'll cover the following...
Problem statement
Your task is to write a function average
. Your function signature should be:
The input array marks[ ]
will contain the marks of all the students in the class. Your task is to calculate the average
marks of the class and return it in the output. It is assumed that the value of size will be greater than zero.
The basic formula for calculating the average of the values is given below:
...