Question

Q2. Develop an Application in C++ that will Prepare Final Grade sheet of Students with the following Guidelines: (10 Marks) D

  1. Less than 200 F.
  2. 200-250 D / D +
  3. 250-300 C/ C +
    300-350 B / B +
    350-400 A / A +
0 0
Add a comment Improve this question Transcribed image text
Answer #1

c++ code:

#include <iostream>
using namespace std;

int main()
{
//variable declaration
int id[10];
int marks[10][4];
int total[10];
string grade[10];
int n;

//get no of student
cout<<"How many student GradeSheet you want to prepare:? ";
cin>>n;

//for n students
cout<<"Enter student-ID & marks of "<<n<<" students";
for(int i=0;i<n;i++)
{
//get student id
cout<<"\nEnter Id of student "<<(i+1)<<": ";
cin>>id[i];

//get 4 sub marks
cout<<"Enter marks of 4 subject of student "<<(i+1)<<": ";
for(int j=0;j<4;j++){
cin>>marks[i][j];
}
}
  
//calculate the total
for(int i=0;i<n;i++)
{
total[i]=0;
for(int j=0;j<4;j++){
total[i]+=marks[i][j];
}
}
//calculate the grade
for(int i=0;i<n;i++)
{
//total less than 200, grade fail
if(total[i]<200)
grade[i]="Fail";
  
//total 200-250 D / D +
if(total[i]>=200 && total[i]<250)
grade[i]="D/D+";
//total 250-300 C/ C +
if(total[i]>=250 && total[i]<300)
grade[i]="C/C+";
  
//total 300-350 B / B +
if(total[i]>=300 && total[i]<350)
grade[i]="B/B+";
  
//total 350-400 A / A +
if(total[i]>=350 && total[i]<400)
grade[i]="A/A+";

}

//grade sheet and marks print
cout << "\nGrade Sheet & Marks Distribution of "<<n<<" Students are as follows:" << endl;
cout<<"*****************************************************";
cout<<"\n\nID\t Sub1 Sub2 Sub3 Sub4 Total Grade ";
cout<<"\n*****************************************************";

//print the student detail on screen
for(int i=0;i<n;i++)
{
cout<<"\n"<<id[i];
for(int j=0;j<4;j++){
cout<<"\t"<<marks[i][j];
}
cout<<"\t"<<total[i]<<"\t"<<grade[i];
cout<<"\n--------------------------------------------------------";
}
cout<<"\n\n";

return 0;
}

output:

- O X C:\Users\NIROSHINI\Documents\CPPFiles\StudentArray\bin\Debug\StudentArray.exe How many student GradeSheet you want to p

//for any clarification please do comments. if you found this solution useful, please give me thumbs up

Add a comment
Know the answer?
Add Answer to:
Less than 200 F. 200-250 D / D + 250-300 C/ C + 300-350 B /...
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
  • C++ The programming language is c++ our program using the following data Mary Smith Green walley...

    C++ The programming language is c++ our program using the following data Mary Smith Green walley Thul Bool Gauteng ) Please key is the n ot your Ter in your mark for Mathematics Ey in your mark for use orientation Key in your mark for watory Wer in your work for Computer literacy Te in r for at e Jobs Africa School: King College 9/11 - Average Year Wark53.67 with label and code The T a QUESTION 2: (40) Suppose...

  • Please help me with this program.You are to write a C++ program that will read in...

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

  • QUESTION Create the required java classes to store the students (id, name), the courses (id, title),...

    QUESTION Create the required java classes to store the students (id, name), the courses (id, title), the exam type (id, name) and the marks for each student. ► Add the necessary methods to; • Store the marks (%) for each student in the course. Search for a course, calculate the averages and display the course details as shown in the example below. Class: Computer Engineering Course Id:222 Course title: DataStructure Student Id Student Name Mid-Term Quiz (10%) Homework (10%) Project...

  • codeblock c++ language Write a program that reads students test scores in the range 0-200 from...

    codeblock c++ language Write a program that reads students test scores in the range 0-200 from a file until end of file (use e of() to check if ifstream reaches the End of File Stream) and store those scores in an array. It should then determine the number of students having scores in each of the following ranges: 0-24, 25-49, 50-74, 75-99, 100- 124, 125–149, 150-174, and 175–200. Finally, the program outputs the total number of students, each score range...

  • A statistics professor would like to build a model relating student scores on the first test...

    A statistics professor would like to build a model relating student scores on the first test to the scores on the second test. The test scores from a random sample of 21 students who have previously taken the course are given in the table. Test Scores Student First Test Grade Second Test Grade 1 88 76 2 72 69 3 80 74 4 44 64 5 71 77 6 50 66 7 98 86 8 78 78 9 73 78...

  • C++: Create a grade book program that includes a class of up to 20 students each...

    C++: Create a grade book program that includes a class of up to 20 students each with 5 test grades (4 tests plus a Final). The sample gradebook input file (CSCI1306.txt) is attached. The students’ grades should be kept in an array. Once all students and their test scores are read in, calculate each student’s average (4 tests plus Final counts double) and letter grade for the class. The output of this program is a tabular grade report that is...

  • Task 5 Download the ENG1060studentmarks.txt file from the Moodle. The file contains the following...

    use Matlab to solve this problem, thank you Task 5 Download the ENG1060studentmarks.txt file from the Moodle. The file contains the following information: 1. 2, 3, 4, Column 1: Student ID Column 2-11: Lab marks (/10) worth 2% each (20% total of final grade) Column 12: Assignment mark (/10) worth 10% of the final grade Column 13: Exam mark (/100) worth 70% of the final grade a) Write a function that accepts a student's laboratory, assignment and exam marks as...

  • Matlab question Task 2 Download the ENG1060studentmarks.txt file from the Moodle. The file contains the following...

    Matlab question Task 2 Download the ENG1060studentmarks.txt file from the Moodle. The file contains the following information: 1. Column 1: Student ID 2. Column 2--11: Lab marks (/10) worth 2% each (20% total of final grade) 3. Column 12: Assignment mark (/10) worth 10% of the final grade 4. Column 13: Exam mark (100) worth 70% of the final grade a) Write a function that accepts a student's laboratory, assignment and exam marks as inputs to determine the final mark...

  • In C Langage Write a grading program for a class with the following grading policies:- a. There are two quizzes, each gr...

    In C Langage Write a grading program for a class with the following grading policies:- a. There are two quizzes, each graded on the basis of 10 points. b. There is one midterm exam and one final exam, each graded on the basis of 100 points. c. The final exam counts for 50 percent of the grade, the midterm counts for 25 percent and the two quizzes together count for a total of 25 percent. Grading system is as follows:-...

  • Many classes calculate a final grade by using a weighted scoring system. For example, “Assignments” might...

    Many classes calculate a final grade by using a weighted scoring system. For example, “Assignments” might be worth 40% of your final grade. To calculate the grade for the Assignments category, the teacher takes the percentage earned on the assignments and multiplies it by the weight. So if the student earned a 90% total on the Assignments, the teacher would take 90% x 40, which means the student earned a 36 percent on the Assignments section. The teacher then calculates...

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
ADVERTISEMENT