Question: Hi, I have some code to write and I have three issues I hope you could look at for me. The code language is C#

Hi, I have some code to write and I have three issues I hope you could look at for me. The code language is C#

Error 1 scenario: Int is an array. The user is required to input their score stored into the variable for each individual (5 individuals):

---- TASK BELOW

For each name in the array of student names (use a foreach loop here)

Prompt the user for a score for each student (use a token for the student name in the prompt)

Store the response in the correct index location in the score array

foreach (string name in studentName){

Hi, I have some code to write and I have three issues

}

Error 2: Unsure how to write the correct code for this. Variables name counter and accumulator are both set to 0

-------TASK BELOW

Increase the value of the accumulator variable by the score entered

Increment the counter by one

I hope you could look at for me. The code language is

Final Error: Task required that the scores inputted are averaged by the total amount of students, in this case 5 students

C# Error 1 scenario: Int is an array. The user is required

Thanks in advance.

Code will write out for each person to input their score. //and wait for a users response for each user Console.writeline( LnIntplease enter a score for f name []) studentScoresConvert.ToInt16(Cons onsole.writeline(" ntlease enter a class Represents the standard input, output, and error streams for console applications. This class cannot be inherited.To browse the.NET Framework source code for this type, see the Reference Source Cannot implicitly convert type 'short' to 'intl] System.Console Console.writeline("InnltPlease enter onsole.WriteLine(n nltPlease enter a Console.Writeline( IninltPlease enter a Console, riteLine(" \tPlease enter a score for {0) ",name[4]); averageScorestudentScores/5; (local variable) int[] studentScores //The following wi //for reading using Console Writel ine(" Operator' pplied to operands of type 'int[l' and 'int to

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!