Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

This assignment is designed to introduce the use of parallel arrays using both foreach and for loops in the Visual C# console environment. Pseudocode for

This assignment is designed to introduce the use of parallel arrays using both foreach and for loops in the Visual C# console environment.

Pseudocode for the Main() method Change the console foreground/background colors to black and white, respectively Declare and initialize a string array to hold 5 student names (see names in screenshot) Declare but do not initialize an integer array to hold 5 student scores Declare an integer variable called counter and initialize it to zero Declare an integer variable called accumulator and initialize it to zero Declare a double variable to hold the average score Display a title (see screenshot) Display a horizontal line using hyphens or underscores 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 Increase the value of the accumulator variable by the score entered Increment the counter by one } Display a horizontal line using hyphens or underscores For loop - hint: for (int i = 0; i < 5; i++) { Display the students name and score on the console } Display the count of scores entered (do not just hard code a 5 here) (see screenshot) Calculate the average score and store the result in the average score variable Display the average score formatted as a number with 2 decimal places (see screenshot) Display a horizontal line using hyphens or underscores Prompt the user to press any key to terminate the program Wait for a keypress

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

mple 10. Determine d dx S 0 t dt.

Answered: 1 week ago