Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The objective of this assignment is to modify the C program from the text so that it outputs the number of A's, B's, C's, D's

image text in transcribed

The objective of this assignment is to modify the C program from the text so that it outputs the number of A's, B's, C's, D's and F's. An A grade is any score that is at least 20% greater than the average. The B grade is any score that is not an A, but is at least 10% greater than the average. An F grade is any score that is at least 20% less than the average. The D grade is any score that is not an F, but is at least 10% less than the average. Any scores that are within 10% of the average (either less than or greater than) are C's. The following is an example of a C program: /* C Example Program Input: An integer, listlen, where listlen is less than 100, followed by listlen-integer values Output: The number of input values that are greater than the average of all input values */ int main () { int intlist[99], listlen, counter, sum, average, result: sum = 0: result = 0: scanf("%d", &listlen): if ((listlen > 0) && (listlen average */ for (counter = 0: counter average) result++: /* Print result */ printf("Number of values > average is: %d ", result): } else printf("Error-input list length is not legal "): }

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

Recommended Textbook for

Managing Your Information How To Design And Create A Textual Database On Your Microcomputer

Authors: Tenopir, Carol, Lundeen, Gerald

1st Edition

1555700233, 9781555700232

More Books

Students also viewed these Databases questions

Question

Define ANN.

Answered: 1 week ago

Question

define EFFECTIVE PARTICIPATION

Answered: 1 week ago