Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a program called grades.c. The program will create an array and initialize the array with the following values: 89.5, 76.2, 88.1, 39.9, 45.9, 90.1,

image text in transcribedCreate a program called grades.c. The program will create an array and initialize the array with the following values: 89.5, 76.2, 88.1, 39.9, 45.9, 90.1, 88.4, 90.2, 77.0, 63.8 These values represent the grades obtained by a class of students for a course (call this array grades). The program must also create an initialize another integer array that will hold the registration numbers of the equivalent students that obtained the above grades. Since this is a fictitious exercise, I want you to write code that will programmatically initialize the registration numbers. Start from 20201234 and every number after that must be 100 units greater i.e. 20201334, 20201434, 20201534 and so on until 20202134. Call this array students. Write a function called void show_grades( int g[], int s[], int size) that will be used to pass the two arrays as argument together with the size of the arrays and it will output a listing of: [reg.no] = grade

After you create the arrays, you must write code to: 1. Show the arrays after creation using the show_grades() function. 2. Realize and output what was the average grade of all the class. 3. Realize and output which student (with which registration number) obtained the highest grade. 4. If the passing grade was 60, what are the percentages of students that passed or failed the course. 5. Write code to sort the grades array in descending order (from highest to lowest), not forgetting to 'swap' the students positions to match the grades positions (i.e. highest grade at position 0, registration number of highest grade at position 0). 6. Repeat task 1 to show the sorted array

CSC131-CSC 100.52021.CS.pul X File c/Users/willi/Downloads/CSC131-CSE100.52021.CS.pdf Booking.com Express VPN Amazon.co.uk - Cn... LastPass password... G Gmail YouTube # Maps ROBOTC EV3: Movi.. : Advanced Robotics... w programming exe...

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

4. Explain the characteristics of successful mentoring programs.

Answered: 1 week ago