Answered step by step
Verified Expert Solution
Question
1 Approved Answer
CODE IN C: You will write a program to help teachers calculate their class's average. The program should be able to take multiple classes with
CODE IN C: You will write a program to help teachers calculate their class's average. The program should be able to take multiple classes with different number of students per class depends on the user go through each class, get their digit grades, output the average and the letter grade on how each class performs on average.
I break the problem down into parts to get you started. The screenshot outputs are to help you understand what is expected. Each part can be built upon the previous one. You don't need to replicate it exactly.
Part : One class and digit grade inputs.
Ask the user teacher to input the number of students in the class
Go through each student in the class, ask for their grade range from
Print out the class's average.
Part : Multiple classes allowed.
Fix the program so that it will allow you to input grades not for one class, but multiple classes.
Ask the user to input the number of classes to process.
For each class, ask the user to input the number of students.
The number of students per class can be the same or different depends on the user.
The rest should be the same.
Part : Check how well the whole class behave on average.
If you get to this point, you should get the average for a class.
Depends on the average, we'tl output what letter grade the class falls in Range:
Under : F
:
:
:
:
Expected Outputs Left: Invalid input example. Right: Final output:
Invalid input
Final output
@:
@:
@:
Expected Outputs Left: Invalid input example. Right: Final output:
Invalid input
Final output
Requirements:
The number of students cannot be less than
If they are less than exit the program using exit;
You will need to import stdlib.h library on top to use exit function.
No arrays allowed. No functions allowed except for printf and scanf.
We can assume that the teacher will input the grades in the correct range But you can put a range check to make your program better optional
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started