IN C You will be creating a program to help a teacher calculate final grades for a class. The program will calculate a final letter grade base on a standard 90/80/70/60 scale. You will be taking input from a file that contains all of the names and grades of each student. You will find the average for each student and output each student's final letter grade. Your program should accept the filename from the command-line
Add error checking to make sure the appropriate number of command line arguments were passed Read in the input file correctly Add error checking to make sure the file was opened correctly Calculate the final grade for each student Generate a report that matches the example below Show table of grades with final letter grade Print off all names with the floating point average
Your program should: Calculate final grades, Print the report
Should include:
void getGrades(...);
void printGrades(...);
void getStudents(...);
void printStudents(...);
void calcGrades(...);
void printFinalLetterGrades(...);
void printPercentageGrades(...);
SOLUTION IN C CODE:-
#include
<stdio.h>
#define SIZE 10
void getGrades(int grades[][SIZE], int size, int
numOfGrades);
void printGrades(int grades[][SIZE], int size, int
numOfGrades);
void getStudents(char names[][50], int size);
void printStudents(char names[][50], int size);
void calcGrades(int grades[][SIZE], char letterGrades[], int size,
int numOfGrades);
void printFinalGrades(char names[][50], int grades[][SIZE], char
letterGrades[], int size, int numOfGrades);
int main()
{
int grades[SIZE][SIZE], numOfStudents,
numOfGrades;
char names[SIZE][50], letterGrades[SIZE];
printf("Enter the number of students: ");
scanf("%d", &numOfStudents);
getStudents(names, numOfStudents);
printf("Enter the number of grades for each
student: ");
scanf("%d", &numOfGrades);
getGrades(grades, numOfStudents,
numOfGrades);
calcGrades(grades, letterGrades, numOfStudents,
numOfGrades);
printFinalGrades(names, grades, letterGrades,
numOfStudents, numOfGrades);
}
void getStudents(char names[][50], int size)
{
for(int i = 0; i < size; i++)
{
printf("Enter the name for student
#%i: ", i+1);
scanf("%s", names[i]);
}
}
void printStudents(char names[][50], int size)
{
for(int i = 0; i < size; i++)
printf("%s\n",
names[i]);
printf("\n");
}
void getGrades(int grades[][SIZE], int size, int numOfGrades)
{
for(int i = 0; i < size; i++)
{
printf("Enter %d grades for student
#%d: ", numOfGrades, i+1);
for(int j = 0; j < numOfGrades;
j++)
scanf("%d",
&grades[i][j]);
}
}
void calcGrades(int grades[][SIZE], char letterGrades[], int size,
int numOfGrades)
{
for(int i = 0; i < size; i++)
{
float sum = 0;
for(int j = 0; j < numOfGrades;
j++)
sum +=
grades[i][j];
sum /= numOfGrades;
if(sum >= 90)
letterGrades[i]
= 'A';
else if(sum >= 80)
letterGrades[i]
= 'B';
else if(sum >= 70)
letterGrades[i]
= 'C';
else if(sum >= 60)
letterGrades[i]
= 'D';
else
letterGrades[i]
= 'F';
}
}
void printGrades(int grades[][SIZE], int size, int numOfGrades)
{
for(int i = 0; i < size; i++)
{
for(int j = 0; j < numOfGrades;
j++)
printf("%d\t",
grades[i][j]);
printf("\n");
}
}
void printFinalGrades(char names[][50], int grades[][SIZE], char
letterGrades[], int size, int numOfGrades)
{
for(int i = 0; i < size; i++)
{
printf("%s\t", names[i]);
for(int j = 0; j < numOfGrades;
j++)
printf("%d\t",
grades[i][j]);
printf("%c\n",
letterGrades[i]);
}
}
And the output screenshot is:


please upvote sir.....
IN C You will be creating a program to help a teacher calculate final grades for...
Here is the (A3b-smallgrades.txt) text file:
Here is the (A3b-largegrades.txt) text file:
Here is the Program A3a without modification:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
void getGrades(int ROWS, int COLS, int grades[ROWS][COLS], char
students[COLS][20]);
void printGrades(int ROWS, int COLS, int
grades[ROWS][COLS]);
void getStudents(int COLS, char students[COLS][20]);
void printStudents(int COLS, char students[COLS][20]);
void calcGrades(int ROWS, int COLS, int grades[ROWS][COLS], char
Fgrades[]);
void printFinalGrades(int COLS, char Fgrades[]);
int main()
{
srand(time(0));
int stu = 0, assign = 0;...
c++
implement a student class
Determine the final scores, letter grades, and rankings of all
students in a course.
All records of the course will be stored in an input file, and a
record of each student will include the first name, id, five quiz
scores, two exam scores, and one final exam score.
For this project, you will develop a program named cpp to determine the final scores, letter grades, and rankings of all students in a course. All...
Java program
Program: Grade Stats In this program you will create a utility to calculate and display various statistics about the grades of a class. In particular, you will read a CSV file (comma separated value) that stores the grades for a class, and then print out various statistics, either for the whole class, individual assignments, or individual students Things you will learn Robustly parsing simple text files Defining your own objects and using them in a program Handling multiple...
You will create a Grade Program that will calculate students’ weighted averages. You are going to have the user enter lab grades, test grades, and project grades. You will then display a grade report of each individual average along with their overall average and letter grade. Ask the user to enter their lab grades. Call the averageGrade function that will allow the user to enter their grades and calculate their average. averageGrade Function: This will pass the average back to...
Your assignment is to write a grade book for a teacher. The
teacher has a text file, which includes student's names, and
students test grades. There are four test scores for each student.
Here is an example of such a file:
Count: 5
Sally 78.0 84.0 79.0 86.0
Rachel 68.0 76.0 87.0 76.0
Melba 87.0 78.0 98.0 88.0
Grace 76.0 67.0 89.0 0.0
Lisa 68.0 76.0 65.0 87.0
The first line of the file will indicate the number of students...
Using Java, write a program that teachers can use to enter and calculate grades of individual students by utilizing an array, Scanner object, casting, and the print method. First, let the user choose the size for the integer array by using a Scanner object. The integer array will hold individual assignment grades of a fictional student. Next, use a loop to populate the integer array with individual grades. Make sure each individual grade entered by the user fills just one...
Matlab: As the user to input 4 quiz grades and 2 test grades. Calculate the final and letter grade when quizzes are worth 50% of the grade and each test is worth 25% of the grade. Display the final grade to the tenth along with the letter grade.
Write a program that will calculate your letter grade at the end of the semester for CSIS130. Your program will read an input file that shall contain all the tests scores and lab scores for the semester, and the input file data should be in the following format: full name of student Test1 Score (0…100), Test2 Score (0..100) , Final Exam Score (0..100), Total Number of Labs: N NLab Scores (0=Fail, 1=Pass) [You will have N lab scores each separated...
Write a program in Java according to the following specifications: The program reads a text file with student records (first name, last name and grade on each line). Then it prompts the user to enter a command, executes the command and loops. The commands are the following: "print" - prints the student records (first name, last name, grade). "sortfirst" - sorts the student records by first name. "sortlast" - sorts the student records by last name. "sortgrade" - sorts the...
Within this C program change the input to a file instead of individual input from the user. You must take the input file name on the command line. Be sure to have simple error checking to be sure the file exists and was successfully opened. The input file will have the following format: First line: Number of students Second Line: Number of grades Third Line: Student Names, space delimited Fourth+ Line(s): Grades for all students for one assignment, space delimited....