Not what you're looking for?
Write a program that reads a student's name together with his or her test scores. The program should then compute the average test scores for each student and assign the appropriate grade. The grade scale is as follows: 90-100, A; 80-89, B; 70-79, C; 60-69, D; 0-59, F.
Your program must use the following functions:
1. A void function, calculateAverage, to determine the average of the five test scores for each student. Use a loop to read and sum the five test scores. (This function does not output the average test score. That task must be done in the function main.)
2. A value-returning function, calculateGrade, to determine and return each student's grade. (This function does not output the grade. That task must be done in the function main.)
Test your program on the following data. Read the data from a file and send the output to a file. Do not use any global variables. Use the appropriate parameters to pass value in and out of functions.
Please see attached for full question.
Purchase this Solution
Write a program that reads a student's name together with his or her test scores
calculateAverage, to determine the average of the five test scores for each student has to be int or double value returning function. Because it will return the average value to the main function.
using namespace std;
double calculateAverage(double test1, double test2, double test3, double test4, double test5);
int calculateGrade(double avg);
double test1, test2, test3, test4, test5;
Purchase this Solution
Free BrainMass Quizzes
This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.
Use this quiz to check your knowledge of a few common UNIX commands. The quiz covers some of the most essential UNIX commands and their basic usage. If you can pass this quiz then you are clearly on your way to becoming an effective UNIX command line user.
Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.
Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.
This quiz consists of some basic networking questions.