The file DebugSix02.cs has syntax and/or logical errors. Determine the problem(s), and fix the program. The expected output is in tabular format with 6 spaces between each column's value....


The fileDebugSix02.cs has syntax and/or logical errors. Determine the problem(s), and fix the program.


The expected output is in tabular format with 6 spaces between each column's value.




// Program averages four numbers

using static System.Console;

class DebugSix02

{

static void Main()

{

int[] numbers = {12, 15, 22, 88};

int x;

int len=numbers.Length;



double average;

double total = 0;

Write("\nThe numbers are...");


for(x = 0; x <>

Write("{0} ", numbers[x]);

WriteLine();


for(x = 0; x <>

{

total += numbers[x];

}

average = total/len;

Write("The average is {0}",average);

}

}



Jun 07, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here