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
Get step-by-step solutions from verified subject matter experts
