The feedback board has ratings 3, 4, and 5. Find the number of entries with sizeof rather than typing the length into the loop. Once you have their total, convert it before division so C does floating-point division rather than truncating an integer result. Print the double with %.1f for one decimal place.
The print is already supplied. Casting with (double) total converts the numerator before division. Casting the result of integer division would be too late. Edit main.c, Run, then Submit.
average from the supplied ratings: find their count with sizeof, total the in-bounds elements in a loop, and divide (double) total by the count. The supplied print should produce Average: 4.0 and a newline.For a manual check, change the last rating to 6 and expect Average: 4.3. Restore that rating to 5 before submitting; keep your completed code.
The element count is sizeof ratings / sizeof ratings[0]; convert total before division.