Hi Im having trouble with this problem In C write an applica

Hi, I\'m having trouble with this problem.

In C# write an application that will perform the following one dimensional array operations: **Note these are three diferrent arrays**

a) Set the three elements of integer array counts to 0.

b) Add 1 to each of the four elements of integer array bonus.

c) Display the five values of integer array bestScores in column format.

Solution

using System;
namespace ArrayApp
{
class ArrayEx
   {
       static void Main(String arg[])
       {
       int [] counts=new int[3];
       int [] bonus={ 10,20,30,40};
       int [] bestScores={ 80,6,75,90,92};
       for(int i=0;i<3;i++)
           {
           counts[i]=0;
           }
       for(int i=0;i<4;i++)
           {
           bonus[i]=bonus[i]+1;
           }
   for(int i=0;i<4;i++)
       {
       Console.writeLine(bestScores[i]);
       }
console.readKey();
}
}
}

Hi, I\'m having trouble with this problem. In C# write an application that will perform the following one dimensional array operations: **Note these are three d

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site