Home / Expert Answers / Computer Science / do-you-know-why-my-code-is-wrong-its-just-producing-0s-as-my-answers-a-professor-will-assign-grade-pa433

(Solved): do you know why my code is wrong? its just producing 0s as my answers. A professor will assign grade ...



do you know why my code is wrong? its just producing 0s as my answers.

A professor will assign grades to his class as follows: any score more than 15 points above average will receive an \( \mathr
A professor will assign grades to his class as follows: any score more than 15 points above average will receive an , from points (inclusive) above average will receive a , from 0-15 points below average will receive a , and more than 15 points below average will receive a . Write a program which will ask the user how many students in the class, then allow them to enter the exam grades for each from the keyboard. The exam grades should be stored in a float array called grades. The main function of your program must have the statement where is the total number of grades entered. That is, main must call a function called curve which will compute the average of the entered grades, as well as the total number (nA) of 'A' grades given using the above curve strategy, the total number ) of grades, etc. The main function should then print the class average, and the number of grades in each category to the screen. Your program must include a proper definition and prototype of the curve function used by main. A sample run of your program should look like: Enter number of grades: 8 Enter each grade, separated by a space: Class average is 56.25


We have an Answer from Expert

View Expert Answer

Expert Answer


There are a few issues in the given code:1. The declaration int N; float grades[N]; is incorrect since N is uninitialized at the time of declaration.
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe