In this article I would like to share with you guys a program that I wrote using C++ that will ask the user to give the subject of the student, the prelim,midterm and final grade and then the program will compute the general average grade of the student and display the results on the screen.
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 in 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.
Sample Program Output
Program Listing
// general_average.cpp
// Author : Jake Rodriguez Pomperada,MAED-IT
// Date : October 12, 2019 8:28 AM Saturday
// Email : jakerpomperada@gmail.com
#include <iostream>
#include <string.h>
using namespace std;
// Prelim - 0.20, Midterm - 0.30, Finals = 0.50
int main()
{
int prelim=0, midterm=0,finals=0;
int solve_grade;
char subject[100];
cout <<"\n\n";
cout <<"\tGeneral Average Grade Solver in C++";
cout <<"\n\n";
cout <<"\tSubject Name : ";
gets(subject);
cout <<"\tEnter Prelim Grade : ";
cin >> prelim;
cout <<"\tEnter Midterm Grade : ";
cin >> midterm;
cout <<"\tEnter Final Grade : ";
cin >> finals;
solve_grade = (prelim * 0.2) +
(midterm * 0.3) +
(finals * 0.5);
cout <<"\n\n";
cout << "\tSubject : " << subject;
cout <<"\n";
cout <<"\tYou general average grade is "
<< solve_grade <<".";
cout <<"\n\n";
cout <<"\tEnd of the Program";
}
No comments:
Post a Comment