Friday, January 22, 2021

General Average of Three Grading Period in C++

 Machine Problem in C++

Design a program that generates the general average of three grading systems. Display the remarks as output,based on the following given scale.


General Average    Equivalent Grade   Remarks

100-97             1.0                EXCELLENT

96-94              1.25               EXCELLENT

93-91              1.50               VERY GOOD

90-88              1.75               VERY GOOD

87-85              2.0                GOOD

84-82              2.25               GOOD

81-79              2.5                SATISFACTORY

76-78              2.75               FAIR

75                 3.0                PASSED

BELOW 75           5.0                FAILED 


I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me at the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod City I also accepting computer repair, networking, and Arduino Project development at a very affordable price. My website is www.jakerpomperada.blogspot.com and www.jakerpomperada.com

If you like this video please click the LIKE button, SHARE, and SUBSCRIBE to my channel.

Your support on my channel is highly appreciated.

Thank you very much.






Program Listing


/* general_average.cpp

Machine Problem in C++


Design a program that generates the general average of three

grading systems. Display the remarks as output,based on the 

following given scale.


General Average    Equivalent Grade   Remarks

100-97             1.0                EXCELLENT

96-94              1.25               EXCELLENT

93-91              1.50               VERY GOOD

90-88              1.75               VERY GOOD

87-85              2.0                GOOD

84-82              2.25               GOOD

81-79              2.5                SATISFACTORY

76-78              2.75               FAIR

75                 3.0                PASSED

BELOW 75           5.0                FAILED 



Author     : Jake Rodriguez Pomperada, MAED-IT, MIT

Tools      : Dev C++ 

Websites   : www.jakerpomperada.com    www.jakerpomperada.blogspot.com

Email      : jakerpomperada@gmail.com

Location   : Bacolod City, Negros Occidental, Philippines


*/



#include <iostream> 

#include <iomanip>

#include <string>



int main()

{

std::string remarks;

int prelim=0,midterm=0,endterm=0;

int general_average=0;

float equiv_grade=0;


std::cout << "\n\n";

std::cout << "\tGeneral Average of Three Grading Period in C++";

std::cout << "\n\n";

std::cout << "\tEnter Prelim Grade  : ";

std::cin >> prelim;

std::cout << "\tEnter Midterm Grade : ";

std::cin >> midterm;

std::cout << "\tEnter Endterm Grade : ";

std::cin >> endterm;

general_average = (prelim+midterm+endterm)/3;

 

 

if (general_average>= 97 && general_average <= 100) {

equiv_grade = 1.0;

remarks = "EXCELLENT";

} else if (general_average>= 94 && general_average <= 96) {

equiv_grade = 1.25;

remarks = "EXCELLENT";

} else if (general_average>= 91 && general_average <= 94) {

equiv_grade = 1.50;

remarks = "VERY GOOD";

} else if (general_average>= 88 && general_average <= 90) {

equiv_grade = 1.75;

remarks = "VERY GOOD";

} else if (general_average>= 85 && general_average <= 87) {

equiv_grade = 2.0;

remarks = "GOOD";

} else if (general_average>= 82 && general_average <= 84) {

equiv_grade = 2.25;

remarks = "GOOD";

} else if (general_average>= 79 && general_average <= 81) {

equiv_grade = 2.25;

remarks = "SATISFACTORY";

} else if (general_average>= 76 && general_average <= 78) {

equiv_grade = 2.75;

remarks = "FAIR";

}else if (general_average>= 75) {

equiv_grade = 3.0;

remarks = "FAIR";

} else {

equiv_grade = 5.0;

remarks = "FAILED";

}

std::cout << "\n\n";

std::cout <<"\tGeneral Average Grade  :  " <<general_average <<"\n";

std::cout <<"\tEquivalent Grade       :  " 

<< std::setprecision(3) << equiv_grade <<"\n";

    std::cout << std::fixed << std::showpoint;

std::cout <<"\tGrade Remarks          :  " <<remarks;

std::cout << "\n\n";

std::cout << "\tEnd of Program";

std::cout << "\n\n";

}


No comments:

Post a Comment