107 320
Assignments Done
98.9%
Successfully Done
In March 2023

# Answer to Question #15347 in C++ for sakura

Question #15347
create array of students (lastname,firstname)
create array of subjects, grades and compute for the average of Grade per subject.
Determine if it is passed or failed.Compute GPA for each students and count all the passed and failed.
Example:
Enter number of subjects
Enter the name of subjects
Enter the name of students
Enter subjects
Enter grades of (name) for (subject)

name
subject prelim midterm final GPA Remarks
math 90 95 100 95 passed
number of pass:
number of fail:
1
2012-09-27T10:58:20-0400
#include <string>
#include <iostream>
#include <conio.h>

using namespace std;
class Students{
public :
string lastname;
string firstname;
};

class Subjects{
public :
string name;
};

int main()
{
Students students[10];
Subjects subjects[10];
int numberofsubjects;
int subject=0;
cout<<"Enter number of subjects: ";
cin>>numberofsubjects;
for(int i=0;i<numberofsubjects;i++){
cout<<"Enter the name of subjects: ";
cin>>subjects[i].name;
}
for(int i=0;i<3;i++){
cout<<"Enter the fisrt name of students: ";
cin>>students[i].firstname;
cout<<"Enter the last name of students: ";
cin>>students[i].lastname;
cout<<"Enter subjects: ";
cin>>subject;
cout<<"Enter grades of "<<students[i].firstname<<" for
"<<subjects[subject].name;
}
for(int i=0;i<3;i++){
}
cout<<"
subject prelim midterm final GPA Remarks
";
for(int i=0;i<numberofsubjects;i++){
}
cout<<"
Number of pass:
"<<numberofsubjects;
cout<<"
Number of fail::
"<<numberofsubjects-1;

getch();
return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!