Question

A new school in the area has hired you to build a grade report software for them. The school wants the software interaction t
0 0
Add a comment Improve this question Transcribed image text
Answer #1

#include <iostream>
#define SCORE 5
using namespace std;

int main()
{
int countStudent = 0; //To get the counter the student record
int shouldRead = 1; //For loop the input when to stop
while(shouldRead)
{
countStudent ++;
cout<<"\n\nEntry for student " << countStudent <<endl;
char studentName[50];
float scores[5];

//Task 1
cout<<"Enter StudentName:\t";
cin>>studentName;
float totalScore=0;

//Task 2
for(int i=0;i<SCORE;i++)
{
cout<<"Enter score " <<(i+1) <<" :\t";
cin>>scores[i];
totalScore +=scores[i];
}

cout<<"\nTotal Score : " << totalScore<<endl;

//Task 3
float average = (float)totalScore/(1.0 * SCORE);
cout<<"Student "<<(countStudent) << " Average is : " <<average<<endl;

//Task 4
char Grade='F';
if(average>90) Grade = 'A';
else if(average>=80 && average<=89) Grade = 'B';
else if(average>=70 && average<=79) Grade = 'C';
else if(average>=60 && average<=69) Grade = 'D';
else Grade='F'; // for 0 to 59

cout<<"Grade is " << Grade;
if(average<0 || average>100) //Break condition
{
shouldRead=0;
}
}
return 0;
}

/* Editor screen*/

main.cpp [StudentGrade] - Code:Blocks 13.12 Eile Edit View Search Project Build Debug Fortran wxSmith Tools Tools+ Plugins Do

/* Output screen*/

D:\cPlus StudentGrade \bin\Debug\StudentGrade.exe Raj Entry for student 1 Enter StudentName: Enter score 1 : 12 Enter score 2

Add a comment
Know the answer?
Add Answer to:
A new school in the area has hired you to build a grade report software for...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Write a program that will calculate your letter grade at the end of the semester for...

    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...

  • First, create two inputs that can be stored in variables consisting of a student's name. When...

    First, create two inputs that can be stored in variables consisting of a student's name. When the program begins ask "Who is the first student?" followed by "Who is the second student?" You only have to have two students for this program. Ask the user for the scores for the last three test grades for each of the students .   After the user has entered both names, and three scores for each, the program should display the following as output:...

  • Your assignment is to write a grade book for a teacher. The teacher has a text file, which includ...

    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...

  • 1. Create a program that takes a numerical score and outputs a letter grade. 2. In...

    1. Create a program that takes a numerical score and outputs a letter grade. 2. In this program, create two void functions titled makeScore and theGrade with an int argument. 3. The function makeScore should have a Reference parameter and theGrade should have a Value parameter. Note: Specific numerical scores and letter grades are listed below: 90-100 = Grade A 80-89 = Grade B 70-79 = Grade C 60-69 = Grade D 0-59 = Grade F 4. The function makeScore...

  • A web page displays an input box that a user can use to a enter a...

    A web page displays an input box that a user can use to a enter a grade from a test and a button that when pressed tells the user what letter grade they received for that test. Assume that the grade is stored in an integer named grade and you will put the letter grade in to a string variable named letter. Write one or more if-statements in Javascript that will set the correct value into letter assuming the standard...

  • Test Scores and Grade Write a program that has variables to hold three test scores. The...

    Test Scores and Grade Write a program that has variables to hold three test scores. The program should ask the user to enter three test scores and then assign the values entered to the variables. The program should display the average of the test scores and the letter grade that is assigned for the test score average. Use the grading scheme in the following table: Test Score Average Letter Grade 90–100 A 80–89 B 70–79 C 60–69 D Below 60...

  • Write a program called printGPA. The program should contain at least 3 methods: main, gradeAverage, and...

    Write a program called printGPA. The program should contain at least 3 methods: main, gradeAverage, and letterGrade. The user will type a line of input containing the student's name, then a number that represents the number of scores, followed by that many integer scores (user input is in bold below). The data type used for the input should be one of the primitive integer data types. Here are two example dialogues: Enter a student record: Maria 5 72 91 84...

  • Write a program that asks the user to enter five test scores. The program should display...

    Write a program that asks the user to enter five test scores. The program should display a letter grade for each score and the average test score. Design the following functions in the program: calcAverage—This function should accept five test scores as arguments and return the average of the scores. determineGrade—This function should accept a test score as an argument and return a letter grade for the score (as a String), based on the following grading scale: Score Letter Grade...

  • Create a MIPS program that does the following: 4. Determine the letter grade a. Use the...

    Create a MIPS program that does the following: 4. Determine the letter grade a. Use the floating point calculated average to determine the letter grade. You will need to research the instructions to use to do comparisons with floating point numbers. (see Course Resources) b. Use the following chart: 90 - 100 80 - 89 70 - 79 ............. 60 - 69.............. <60 ..................... ............... 5. Display a message and the letter grade. 6. Your output should look similar to...

  • Design a function named max that accepts two integer values as arguments and returns the value...

    Design a function named max that accepts two integer values as arguments and returns the value that is the greater of the two. For example, if 7 and 12 are passed as arguments to the function, the function should return 12. Use the function in a program that prompts the user to enter two integer values. The program should display the value that is the greater of the two. Need Variable lists, Psuedocode, ipo chart, Flow Chart, and a python...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT