#include <iostream>
using namespace std;

int main() {
    char answers[5] = {'a', 'a', 'b', 'b', 'c'};
    char userAnswers[5];
    int score = 0;

    cout << "Philippine History Quiz\n" << endl;
    cout << "Multiple Choice Only\n" << endl;

    cout << "1. Who was the first President of the Philippines?\n";
    cout << "   a) Emilio Aguinaldo\n   b) Manuel L. Quezon\n   c) José P. Laurel\n";
    cout << "Your Answer: ";
    cin >> userAnswers[0];
    if (userAnswers[0] == 'a' || userAnswers[0] == 'b' || userAnswers[0] == 'c') {
        if (userAnswers[0] == answers[0]) {
            cout << "Correct!\n\n";
            score++;
        } else {
            cout << "Wrong!\n\n";
        }
    } else {
        cout << "Invalid Answer!\n\n";
    }
    
    cout << "2. Which event marked the start of the Philippine Revolution against Spain?\n";
    cout << "   a) The Cry of Pugad Lawin\n   b) The Battle of Mactan\n   c) The Pact of Biak-na-Bato\n";
    cout << "Your Answer: ";
    cin >> userAnswers[1];
    if (userAnswers[1] == 'a' || userAnswers[1] == 'b' || userAnswers[1] == 'c') {
        if (userAnswers[1] == answers[1]) {
            cout << "Correct!\n\n";
            score++;
        } else {
            cout << "Wrong!\n\n";
        }
    } else {
        cout << "Invalid Answer!\n\n";
    }
    
    cout << "3. Who is known as the national hero of the Philippines?\n";
    cout << "   a) Andres Bonifacio\n   b) José Rizal\n   c) Apolinario Mabini\n";
    cout << "Your Answer: ";
    cin >> userAnswers[2];
    if (userAnswers[2] == 'a' || userAnswers[2] == 'b' || userAnswers[2] == 'c') {
        if (userAnswers[2] == answers[2]) {
            cout << "Correct!\n\n";
            score++;
        } else {
            cout << "Wrong!\n\n";
        }
    } else {
        cout << "Invalid Answer!\n\n";
    }
    
    cout << "4. What was the name of the treaty that ended the Spanish-American War and led to the cession of the Philippines to the United States?\n";
    cout << "   a) Treaty of Versailles\n   b) Treaty of Paris (1898)\n   c) Treaty of Tordesillas\n";
    cout << "Your Answer: ";
    cin >> userAnswers[3];
    if (userAnswers[3] == 'a' || userAnswers[3] == 'b' || userAnswers[3] == 'c') {
        if (userAnswers[3] == answers[3]) {
            cout << "Correct!\n\n";
            score++;
        } else {
            cout << "Wrong!\n\n";
        }
    } else {
        cout << "Invalid Answer!\n\n";
    }
    
    cout << "5. Which city was the capital of the Philippines during the Japanese occupation in World War II?\n";
    cout << "   a) Cebu\n   b) Davao\n   c) Manila\n";
    cout << "Your Answer: ";
    cin >> userAnswers[4];
    if (userAnswers[4] == 'a' || userAnswers[4] == 'b' || userAnswers[4] == 'c') {
        if (userAnswers[4] == answers[4]) {
            cout << "Correct!\n\n";
            score++;
        } else {
            cout << "Wrong!\n\n";
        }
    } else {
        cout << "Invalid Answer!\n\n";
    }
    int percentage = score * 20;
    cout << "\nYour Score: " << score << "/5" << endl;
    cout << "Grade: " << percentage << "%" << endl;
    cout << "Remarks: ";
    if (score == 5) {
        cout << "Excellent" << endl;
    } else if (score == 4) {
        cout << "Satisfactory" << endl;
    } else if (score == 3) {
        cout << "Very Good" << endl;
    } else if (score == 2) {
        cout << "Good" << endl;
    } else if (score == 1) {
        cout << "Fair" << endl;
    } else {
        cout << "Failed" << endl;
    }   
    return 0;
}