-->





Translate

C++ projects source code

2 comments
Download cpp projects for final year. Every project consist of sub modules. You can find documentation with every project which explains the basic idea of projects. 
These cpp projects can help you to get new c programming project ideas. C++ beginners can get the basic idea to make a project in c++ programming.

1. School management system project in c++ source code


school management c++ project source code download free

2. Student management system c++ project source code


c++ project to manage student record free download

3. Array based list c++ example project source code


c sample program array based list project source code


4. Array based queue implementation c++ project source code


array based queue c++ project source code download free



5. C++ queue project source code using array, linked list and  circular linked list


queue c++ project source code



6. C++ project for Payroll management system source code download





2 comments:

  1. random number guessing game
    source code
    #include
    #include // for srand() and rand()
    #include // for time(NULL) in srand()

    using namespace std;

    int main(int argc, char *argv[])
    {
    int max_num = 50;
    int max_tries = 5;

    int random_number;
    int guess = 0;
    int current_tries = 0;

    int low_guess = 1;
    int high_guess = max_num;

    srand(time(NULL));
    random_number = rand() % max_num + 1;

    while(current_tries < max_tries) {
    cout << "Enter a number from 1 to " << max_num << " (" << max_tries-current_tries << " tries left - between "
    << low_guess << " and " << high_guess << "): ";
    cin >> guess;

    if(guess == random_number) {
    cout << "Congratulations! You guessed correctly!" << endl;
    break;
    }

    if(guess > random_number) {
    cout << "Too HIGH!!" << endl;
    if(guess < high_guess || high_guess == max_num) {
    high_guess = guess;
    }
    }

    if(guess < random_number) {
    cout << "Too LOW!!" << endl;
    if(guess > low_guess || low_guess == 1) {
    low_guess = guess;
    }
    }

    current_tries++;
    if(current_tries >= max_tries) {
    cout << "Outta tries! Better luck next time. The number was " << random_number << endl;
    break;
    }
    }

    return 0;
    }

    ReplyDelete
  2. You've to build the classic tic-tac-toe game. At the start of the game your program should display a 3x3 grid at the center of the screen. It should prompt the user where they want to place their input and re-display the grid updated after the user's turn. After this it should give a 5 second delay showing a countdown before the computer's turn. Next it should get the input from the computer (generate a random input) and display the grid updated after the computer’s turn.

    The process shall repeat until either there's a winner or a draw. Your program will announce the output of the contest. At the end it should ask the user if they want to play again. If they answer yes, then the game should be replayed. In case of a no, the program will exit thanking the user.

    You must give the option to choose the symbol ( ‘0’ or ‘X’) to represent the user and the computer plays with '0' or 'X' whichever you like. The grid should be properly displayed/aligned each time it is displayed.

    You will not use any global variables. All your variables should be local variables declared somewhere inside main().

    All your actions (taking input from the user or computer, displaying the grid, updating the grid, etc.,) should happen inside functions. These functions will be called inside the main() function. Ideally, the main() function should just contain the While-loop and some local variables only, apart from these function calls.

    The main() function will pass the necessary information to these called functions and these functions, in their turn, will somehow pass the necessary information back to main().

    Below is a pseudocode structure to give you an idea. It is by no way complete.

    You will have to figure out the arguments and return types of these functions. You might define extra functions if you feel the need. You will create local variables as you need and update them at appropriate places in the program.


    int main() {

    // declare your array here. do {
    if (user_turn==true) get_user_input (); else
    display_countdown(); get_comp_input ();

    update_array(); display_array();
    if (is_there_a_winner()==true) break;

    } while (game_finished==false);

    // announce the winner or a draw.

    // ask if the user wants to play again? if yes, restart everything.

    return 0;
    }


    You will have to submit two implementations: 1) Using a 2D array and 2) Using a 1D array to store user and computer turns. You should be able to explain the working and purpose of every line of code that you submit.

    ReplyDelete