0% found this document useful (0 votes)
529 views

Grades Entering System (C++ Programming)

The document is a C++ program that calculates student grades for 5 subjects over 4 grading periods, determines a final grade for each subject and an overall grade, and generates a certificate showing the student's grades and results. It prompts the user to input a student's name, section, and individual grades for 20 assignments. It then calculates final grades for each subject and an overall grade using weighted averages. It prints a certificate with the student's grades and indicates if they passed or failed, and allows input of additional students' data.

Uploaded by

WhiskeryFrog
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
529 views

Grades Entering System (C++ Programming)

The document is a C++ program that calculates student grades for 5 subjects over 4 grading periods, determines a final grade for each subject and an overall grade, and generates a certificate showing the student's grades and results. It prompts the user to input a student's name, section, and individual grades for 20 assignments. It then calculates final grades for each subject and an overall grade using weighted averages. It prints a certificate with the student's grades and indicates if they passed or failed, and allows input of additional students' data.

Uploaded by

WhiskeryFrog
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 4

#include <iostream>

using namespace std;

int main()
{
float grade[19];
int final_grade1, final_grade2, final_grade3, final_grade4, final_grade5,
finale;
string finale_1, finale_2, finale_3, finale_4, finale_5;
int ave;
string res;
string name;
string last_name;
string section;
string add;
int countp = 0, countf = 0, count = 0, count_stu = 0;

calculations:
cout<<"Enter your First name: ";
cin>>name;
cout<<"Enter your last name: ";
cin>>last_name;
cout<<"Enter your section: ";
cin>>section;
cout<<""<<endl;
cout<<"Preliminary Grades:"<<endl;
cout<<""<<endl;

cout<<"Preliminary Grades in Science: ";


cin>>grade[0];
cout<<"Preliminary Grades in Mathematics: ";
cin>>grade[1];
cout<<"Preliminary Grades in English: ";
cin>>grade[2];
cout<<"Preliminary Grades in Programming: ";
cin>>grade[3];
cout<<"Preliminary Grades in History: ";
cin>>grade[4];
//lagyan ng cls
cout<<""<<endl;
cout<<"Midterm Grades:"<<endl;
cout<<""<<endl;

cout<<"Midterm Grades in Science: ";


cin>>grade[5];
cout<<"Midterm Grades in Mathematics: ";
cin>>grade[6];
cout<<"Midterm Grades in English: ";
cin>>grade[7];
cout<<"Midterm Grades in Programming: ";
cin>>grade[8];
cout<<"Midterm Grades in History: ";
cin>>grade[9];
//lagyan ng cls
cout<<""<<endl;
cout<<"Prefinal Grades:"<<endl;
cout<<""<<endl;
cout<<"Prefinal Grades in Science: ";
cin>>grade[10];
cout<<"Prefinal Grades in Mathematics: ";
cin>>grade[11];
cout<<"Prefinal Grades in English: ";
cin>>grade[12];
cout<<"Prefinal Grades in Programming: ";
cin>>grade[13];
cout<<"Prefinal Grades in History: ";
cin>>grade[14];
//lagyan ng cls
cout<<""<<endl;
cout<<"Final Grades:"<<endl;
cout<<""<<endl;

cout<<"Finals Grades in Science: ";


cin>>grade[15];
cout<<"Finals Grades in Mathematics: ";
cin>>grade[16];
cout<<"Finals Grades in English: ";
cin>>grade[17];
cout<<"Finals Grades in Programming: ";
cin>>grade[18];
cout<<"Finals Grades in History: ";
cin>>grade[19];
count++;

final_grade1=(grade[0]*.20)+(grade[5]*.20)+(grade[10]*.30)+(grade[15]*.30);
final_grade2=(grade[1]*.20)+(grade[6]*.20)+(grade[11]*.30)+(grade[16]*.30);
final_grade3=(grade[2]*.20)+(grade[7]*.20)+(grade[12]*.30)+(grade[17]*.30);
final_grade4=(grade[3]*.20)+(grade[8]*.20)+(grade[13]*.30)+(grade[18]*.30);
final_grade5=(grade[4]*.20)+(grade[9]*.20)+(grade[14]*.30)+(grade[19]*.30);
finale=(final_grade1+final_grade2+final_grade3+final_grade4+final_grade5)/5;
finale_1= final_grade1>=75?"PASSED":"FAILED";
finale_2= final_grade2>=75?"PASSED":"FAILED";
finale_3= final_grade3>=75?"PASSED":"FAILED";
finale_4= final_grade4>=75?"PASSED":"FAILED";
finale_5= final_grade5>=75?"PASSED":"FAILED";

/**if (ave>=75){
countp++;
count++;
}else{
countf++;
count++;
}
**/
//lagyan ng cls
cout<<"| Certificate of Remarks
| "<<endl;
cout<<"| Name: "<<last_name<<", "<<name<<" | Student number:
2021-"<<1000+count<<" |"<<endl;;
cout<<"| Grade: "<<section<<" | School year: 2020-2021 |
1st Semester |"<<endl;

cout<<"============================================================================
"<<endl;
cout<<"| Subjects | Prelims | Midterm | Prefinal | Finals | Final Grade |
Remarks |"<<endl;

cout<<"----------------------------------------------------------------------------
-"<<endl;
cout<<"| Science | "<<grade[0]<<" | "<<grade[5]<<" | "<<grade[10]<<"
| "<<grade[15]<<" | "<<final_grade1<<" | "<<finale_1<<" |"<<endl;

cout<<"----------------------------------------------------------------------------
-"<<endl;
cout<<"| Math | "<<grade[1]<<" | "<<grade[6]<<" | "<<grade[11]<<" |
"<<grade[16]<<" | "<<final_grade2<<" | "<<finale_2<<" |"<<endl;

cout<<"----------------------------------------------------------------------------
-"<<endl;
cout<<"| English | "<<grade[2]<<" | "<<grade[7]<<" | "<<grade[12]<<" |
"<<grade[17]<<" | "<<final_grade3<<" | "<<finale_3<<" |"<<endl;

cout<<"----------------------------------------------------------------------------
-"<<endl;
cout<<"|Programming| "<<grade[3]<<" | "<<grade[8]<<" | "<<grade[13]<<" |
"<<grade[18]<<" | "<<final_grade4<<" | "<<finale_4<<" |"<<endl;

cout<<"----------------------------------------------------------------------------
-"<<endl;
cout<<"| History | "<<grade[4]<<" | "<<grade[9]<<" | "<<grade[14]<<" |
"<<grade[19]<<" | "<<final_grade5<<" | "<<finale_5<<" |"<<endl;

cout<<"============================================================================
"<<endl;
cout<<" | Total |
"<<finale<<" |"<<endl;

if (finale>=75){
cout<<last_name<<" PASSED this semester of the school year."<<endl;
cout<<"CONGRATULATIONS!"<<endl;
countp++;
count_stu++;
}else{
cout<<last_name<<" FAILED this semester of the school year."<<endl;
cout<<"Better Luck Next Time"<<endl;
countf++;
count_stu++;
}
//lagyan ng cls
cout<<""<<endl;
cout<<""<<endl;
cout<<"Add another student?";
cin>>add;
//lagyan ng cls
while (add=="no")
{
cout<<"No. of students: "<<count_stu<<endl;
cout<<"No. of students passed: "<<countp<<endl;
cout<<"No. of students failed: "<<countf<<endl;
return 0;
}
goto calculations;

return 0;
}

You might also like