Question: public class Program { public static void Main() { int[] myScores = { 100, 76, 88, 100, 90 }; int sum = 0; for (int

public class Program { public static void Main() { int[] myScores = { 100, 76, 88, 100, 90 }; int sum = 0;

for (int x = 0; x < 5; x++) { sum += myScores[x]; }

double avg = (double)sum / myScores.Length;

Console.WriteLine("Sum = {0} and average = {1}", sum, avg);

int above = 0; for (int x = 0; x < myScores.Length; x++)

{

if (myScores[x] > avg) above++; }

Console.WriteLine("The number of scores above average is " + above ); } }

How to find below the average and in the same average?

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 Databases Questions!