Friday, November 17, 2017

Code Review: Geographical Quiz Game System

Compiler or Tool: Turbo C

Programming Language: C++

User Interface Type: CUI [Character User Interface]

Description:

This Geographical Quiz Game System is nothing but automating quiz game process. Even though the system is very small it teaches how to code simple system of RAM type [i.e., not file handling support system] in C++ language.

The system has only one class, test with following properties:

clip_image001

The main() function presents main menu and becomes single point entry and exit code. The main() function call graph is as follows:

clip_image002

The menu presented by this main() function is as follows:

clip_image004

The system is good example for how to generate a good idea/code with already existing game. It uses one class and one function. It is open for adding more features and facilities within it.

Total code lines for this system are 92 lines [approximately]. It is a most suitably called as mini project in C++ language.

If you want to write or construct or program C++ mini-project and do not know how or from where to start buy this simple e-book: Code Review of 26 C++ mini-projects.

Note: For other details send request e-mail to mailforprojects@rediffmail.com. Add your comments in below available comment box.

 

Note: Click these label/tags to view all related posts. Tags: C++MiniProject

 

…till next post, bye-bye & take care.

Thursday, November 16, 2017

C++ Code Review: calculates sum of series of type 1+2+3+...+n

Description: This program calculates sum of series of type 1+2+3+...+n.

Code:

//Compiling Tool: Code::Block IDE with MinGW

//Program calculates sum of series of type 1+2+3+...+n.

 

#include<iostream>

#include<conio.h> //for getch()

 

using namespace std;

 

int main()

{

 

    int i,n,sum=0;

    cout<<"Series Type:1+2+3+...+n"<<endl;

    cout<<"Enter the value of n:";

    cin>>n;

 

    for(i=1; i<=n; ++i)

        sum+=i;

    cout<<"Sum="<<sum;

    getch();

}      

 

 Output:

clip_image002

If you want to write or construct or program C++ mini-project and do not know how or from where to start buy this simple e-book: Code Review of 26 C++ mini-projects. For book sample click this link.

Add your comments in below available comment box.

Note: Click these label/tags to view all related posts. Tags: C++Code

 

…till next post, bye-bye & take care.

Tuesday, November 14, 2017

C++ Code Review: prints 1 to n Without Using Loops, Recursion or Goto Statement

Description: This program prints 1 to n Without Using Loops, Recursion or Goto Statement

Code:

//Compiling Tool: Code::Block IDE with MinGW

//Program prints 1 to n Without Using Loops, Recursion or Goto Statement

 

#include<iostream>

#include<conio.h> //for getch()

 

using namespace std;

 

class Num

{

    public:

    static int i;

    Num()

    {

        cout<<i++<<" ";

    }

};

int Num::i=1;

 

int main()

{

    int n;

    cout<<"Enter value on n:";

    cin>>n;

    Num obj[n];

    return 0;

}     

 

Output:

 clip_image002

f you want to write or construct or program C++ mini-project and do not know how or from where to start buy this simple e-book: Code Review of 26 C++ mini-projects. For book sample click this link.

Add your comments in below available comment box.

Note: Click these label/tags to view all related posts. Tags: C++Code

 

…till next post, bye-bye & take care.