C Program:
#include <stdio.h>
#include <stdlib.h>
//Function that reads scores from user and stores in array
void input(int scores[])
{
int i;
//Iterating over 10 scores
for(i=0; i<10; i++)
{
//Reading scores and
storing in array
printf("\nEnter grade or
student %d: ", (i+1));
scanf("%d",
&scores[i]);
}
}
//Function that finds grades based on score
void result(int scores[], int best)
{
int i;
char grade=' ';
printf("\nGrades:\n");
//Iterating over 10 scores
for(i=0; i<10; i++)
{
//Calculating
grade
if(scores[i] >= (best
- 10))
{
grade = 'A';
}
else if(scores[i] >=
(best - 20))
{
grade = 'B';
}
else if(scores[i] >=
(best - 30))
{
grade = 'C';
}
else if(scores[i] >=
(best - 40))
{
grade = 'D';
}
//Printing
result
printf("\nThe grade for
student %d is %c\n", (i+1), grade);
}
}
//Main function
int main()
{
int scores[10];
int i, bestScore;
//Calling input() function
input(scores);
//Initially assume that best score was
starting score
bestScore=scores[0];
printf("\n\nScores: \n");
//Iterating over each score and test for best
score
for(i=0; i<10; i++)
{
//Printing score
printf("%d, ",
scores[i]);
//Checking for best
score
if(scores[i] >
bestScore)
{
//Updating best score
bestScore = scores[i];
}
}
printf("\n\nThe best score was %d \n", bestScore);
//Calling result function
result(scores, bestScore);
return 0;
}
____________________________________________________________________________________________
Sample Run:
Write a program using "C" in visual studio that: A. Has a function (input()) that allows...
write a program that uses a function to read in the grades for four classes and then uses a function to calculate the average grade in each of the classes. input the grades for one student. we will name her Beverly. output how Beverly's grade differs from each classe average. Make sure that your output is very clear. Below is your data: English 90 70 85 45 95 95 82 97 99 65 History 63 94 60 76 83 98...
Microsoft Visual Studios 2017 Write a C++ program that computes a student’s grade for an assignment as a percentage given the student’s score and total points. The final score must be rounded up to the nearest whole value using the ceil function in the <cmath> header file. You must also display the floating-point result up to 5 decimal places. The input to the program must come from a file containing a single line with the score and total separated by...
using java
Program: Please read the complete prompt before going into coding. Write a program that handles the gradebook for the instructor. You must use a 2D array when storing the gradebook. The student ID as well as all grades should be of type int. To make the test process easy, generate the grade with random numbers. For this purpose, create a method that asks the user to enter how many students there are in the classroom. Then, in each...
Please help me with this program.You are to write a C++ program that will read in up to 15 students with student information and grades. Your program will compute an average and print out certain reports. Format: The information for each student is on separate lines of input. The first data will be the student�s ID number, next line is the students name, next the students classification, and the last line are the 10 grades where the last grade is...
You have been asked to write a program to grade several multiple-choice exams. The exam has 20 questions, each answered with a letter in the range of ‘a’ through ‘f’. The answers key is declared in the program as constant of type string. An example of answer key is “abcdefabcdefabcdefab”. Your program should work for any other answer key. The program should first ask users for the number of students to be graded. Then it should have a while loop...
I have a C++ code that lets me enter, display and delete a
student record. I need to implement a function that prints the
average grade score of the students I input.
Below is my code and a picture of how my code looks right
now.
#include<iostream>
#include<stdlib.h>
using namespace std;
//Node Declaration
struct node
{
string name;
string id;
int score;
node *next;
};
//List class
class list
{
private:
//head...
Write a C++ program named, gradeProcessor.cpp, that will do the following tasks: -Print welcome message -Generate the number of test scores the user enters; have scores fall into a normal distribution for grades -Display all of the generated scores - no more than 10 per line -Calculate and display the average of all scores -Find and display the number of scores above the overall average (previous output) -Find and display the letter grade that corresponds to the average above (overall...
using linux terminal
NEW YORK CITY COLLEGE OF TECHNOLOGY THE CITY UNIVERSITY OF NEW YORK Department of Computer Engineering Technology 300 Jay Street, Brooklyn, NY 11201-1909 EMT 2390L - Lab 6 Instructions: Create a new script and name it lab6. Include the following in your script: 1- A global variable named course with "EMT 2390L" assigned to it as default value. 2- A global variable named score that will store a number between 0 and 100. 3. A global variable...
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...