subject

Instructions In this example, you use an array called scores, and we pass the array to a function called printScores(). This function loops through the array elements, and prints them. As before, the program prints the average of the grades. Here is the code: 04 UP APP 1 #include 3 5_ 6 void printScores (float scores (1) int main() { char s_name[] - "ECPI University"; float scores[6] - 78.7, 98.4, 120.2, 95.5, 180., 88.8}; float average - e. es int counter; printScores (scores); for(counter - counter < 6j counter++) { average -- scores[ counter); average /= float(6); printf("\nAt %s, your class average is %.16.", S_name, average) return ; 24 void printScores (float scores[]) int counter 28 printf("Here are your scores:\n\n"); for(counter - e; counter < 6; counter++) { printf("%.1f\n", scores[ counter]); return; And here is the output: R: CIS126\CIS126 November 2018 Development Unit 4\Unit 4 Guided Practice 2.exe Here are your scores: 78.7 98.4 100.0 196.5 100.0 88.8 At ECPI University, your class average is 93.7. - Process exited after 0.1714 seconds with return value 47 Press any key to continue... Submission Instructions Now, you enter the code, and run it. (No flowchart this time) Upload your. c file and a screenshot of your code output saved in a Word document including the path name directory at the top of the screen into the dropbox for grading. Note - Do Not Copy and paste the output as seen in the directions of this exercise. This considered plagiarizing.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 15:10
What is word processing and word wrap?
Answers: 1
question
Computers and Technology, 22.06.2019 07:20
Write a pseudocode solution for each of these problems. 1. design a while loop that lets that user enter a number. the number should be multiplied by 10, and the result stored in a variable named product. the loop should iterate as long as product contains a value less than 100. 2. design a do-while loop that asks the user to enter two numbers. the numbers should be added and the sum displayed. the loop should ask the user whether he or she wishes to perform the operation again. if so, the loop should repeat; otherwise it should terminate. 3. design a for loop that displays the following set of numbers: 0, 10, 20, 30, 40, 50 100. 4. design a nested loop that displays 10 rows of # characters. there should be 15 # characters in each row. 5. convert this for loop to a while loop. declare integer count for count = 1 to 50 display count end for 6. find the error in the following pseudocode. declare boolean finished = false declare integer value, cube while not finished display “enter a value to be cubed.” input value; set cube = value ^ 3 display value, “ cubed is “, cube end while
Answers: 2
question
Computers and Technology, 22.06.2019 22:20
Pp 4.1 design and implement a class called sphere that contains instance data that represents the sphere’s diameter. define the sphere constructor to accept and initialize the diameter and include getter and setter methods for the diameter. include methods that calculate and return the volume and surface area of the sphere (see pp 3.5 for the formulas). include a tostring method that returns a one-line description of the sphere. create a driver class called multisphere, whose main method instantiates and updates several sphere objects.
Answers: 1
question
Computers and Technology, 23.06.2019 01:30
For a typical middle-income family, what is the estimated cost of raising a child to the age of 18? $145,500 $245,340 $304,340 $455,500
Answers: 2
You know the right answer?
Instructions In this example, you use an array called scores, and we pass the array to a function ca...
Questions
question
Mathematics, 06.04.2021 21:30
question
Biology, 06.04.2021 21:30