Machine Problem in C++
Write a C++ program that enters a Grades 1st, 2nd, 3rd, and 4th Quarter and displays the average and remarks.
Remarks:
90 - 100 Excellent
86 -89 Very Good
81 - 85 Good
75 - 80 Fair
75 below Failed
Any remarks : Invalid
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
/*
Machine Problem
Write a C++ program that enters a Grades 1st, 2nd, 3rd and 4th
Quarter and display the average and remarks.
Remarks:
90 - 100 Excellent
86 -89 Very Good
81 - 85 Good
75 - 80 Fair
75 below Failed
Any remarks : Invalid
*/
#include <iostream>
using namespace std;
int main()
{
int first_q = 0;
int second_q = 0;
int third_q= 0;
int fourth_q = 0;
int average = 0;
string remarks;
cout << "\n\n";
cout <<"\tStudent Grade Solver with Remarks in C++";
cout << "\n\n";
cout << "\tEnter First Quarter : ";
cin >> first_q;
cout << "\tEnter Second Quarter : ";
cin >> second_q;
cout << "\tEnter Third Quarter : ";
cin >> third_q;
cout << "\tEnter Fouth Quarter : ";
cin >> fourth_q;
average = (first_q+second_q+third_q+fourth_q) / 4;
if (average >= 90 && average <= 100) {
remarks = "Excellent";
} else if (average >= 86 && average <= 89) {
remarks = "Very Good";
} else if (average >= 81 && average <= 85) {
remarks = "Good";
} else if (average >= 75 && average <= 80) {
remarks = "Fair";
} else if (average < 75) {
remarks = "Failed";
} else {
remarks = "Invalid";
}
cout << "\n\n";
cout << "\tAverage : " << average <<"\n";
cout << "\tRemarks : " << remarks;
cout << "\n\n";
cout << "\tEnd of Program";
cout << "\n\n";
}
No comments:
Post a Comment