A simple game that I wrote in C++ about Capital City Quiz Game a long time ago.

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.



Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg



=================================================



Want to support my channel?

GCash Account

Jake Pomperada

09173084360



Paypal

https://paypal.me/jakerpomperada



Patreon

https://www.patreon.com/jakerpomperada



Thank you very much for your support

Program Listing

// Created By: Mr. Jake Rodriguez Pomperada,MAED-IT
// Date : January 14, 2010  Thursday
// Email : jakerpomperada@yahoo.com
// Tool  : C++


#include <iostream>
#include <string.h>

using namespace std;

main() {
    char ot[20],jap[20],ma[20],ro[20],mo[20],capital[20];

    int wrong=0,right=0;
    string remarks;
    float solve=0;

    cout << "\n\t\t == CAPITAL CITY QUIZ GAMES IN C++ ==";
    cout << "\n";
    cout << " \n\t\tCreated By: Mr. Jake R. Pomperada, MAED-IT";
    cout << "\n\n";
    cout << "What is Capital City of Canada ? : ";
    gets(capital);
    strupr(capital); // Function To Conver Lower Case To UpperCase
    strcpy(ot,"OTTAWA");

    if (strcmp(ot,capital) == 0) {
        cout << "\n Your answer "
             << capital << " is right.";
        cout << "\n The Capital City of Canada is Ottawa.";
        right++;
    }
    else {
        cout << "\n Your answer "
             << capital << " is wrong.";

        cout << "\n The Capital City of Canada is Ottawa.";
        wrong++;
    }
    cout << "\n\n";
    cout << "What is Capital City of Japan ? : ";
    gets(capital);
    strupr(capital); // Function To Conver Lower Case To UpperCase
    strcpy(jap,"TOKYO");

    if (strcmp(jap,capital) == 0) {
        cout << "\n Your answer "
             << capital << " is right.";
         cout << "\n The Capital City of Japan is Tokyo.";
        right++;
    }
    else {
        cout << "\n Your answer "
             << capital << " is wrong.";
        cout << "\n The Capital City of Japan is Tokyo.";
        wrong++;
    }

    cout << "\n\n";
    cout << "What is Capital City of Philippines ? : ";
    gets(capital);
    strupr(capital); // Function To Conver Lower Case To UpperCase
    strcpy(ma,"MANILA");

    if (strcmp(ma,capital) == 0) {
        cout << "\n Your answer "
             << capital << " is right.";
        cout << "\n The Capital City of Philippines is Manila";
        right++;
    }
    else {
        cout << "\n Your answer "
             << capital << " is wrong.";
         cout << "\n The Capital City of Philippines is Manila.";
        wrong++;
    }

   cout << "\n\n";
   cout << "What is Capital City of Italy ? : ";
    gets(capital);
    strupr(capital); // Function To Conver Lower Case To UpperCase
    strcpy(ro,"ROME");

    if (strcmp(ro,capital) == 0) {
        cout << "\n Your answer "
             << capital << " is right.";
        cout << "\n The Capital City of Italy is Rome.";
        right++;
    }
    else {
        cout << "\n Your answer "
             << capital << " is wrong.";
        cout << "\n The Capital City of Italy is Rome.";
        wrong++;
    }

   cout << "\n\n";
   cout << "What is Capital City of Russia ? : ";
    gets(capital);
    strupr(capital); // Function To Conver Lower Case To UpperCase
    strcpy(mo,"MOSCOW");

    if (strcmp(mo,capital) == 0) {
        cout << "\n Your answer "
             << capital << " is right.";
        cout << "\n The Capital City of Russia is Moscow.";
        right++;
    }
    else {
        cout << "\n Your answer "
             << capital << " is wrong.";
        cout << "\n The Capital City of Russia is Moscow.";
        wrong++;
    }


    solve = (right / 5.0) * 50 + 50;

    if (solve >= 75)  {
        remarks = "You Passed the Quiz Congrats !!!";
    }
    else {
        remarks = "Sorry you Failed the Quiz Try Again!!!";
    }


   cout << "\n\n\n";
   cout << " === SUMMARY RESULTS ====";
   cout << "\n";
    cout << "\n Number of Right Answers :=>  "
         << right << ".";
    cout << "\n Number of Wrong Answers :=>  "
          << wrong << ".";
    cout << "\n\n";
    cout << " Your Grade : " << solve;
    cout << "\n Remarks : " << remarks;
    cout << "\n\n";
    system("PAUSE");
}

Leave a Reply

Your email address will not be published.