Question: Given the following declarations, int num[] = {10, 30, 50, 20, 40, 80}; int sum, i; double average; Write the program fragment by using

Given the following declarations, int num[] = {10, 30, 50, 20, 40,

Given the following declarations, int num[] = {10, 30, 50, 20, 40, 80}; int sum, i; double average; Write the program fragment by using while loop to calculate the sum and average of the array num[].

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!