Raised This Month: $ Target: $400
 0% 

C++ Gaben test [Done]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Da_sk8rboy
Veteran Member
Join Date: Jul 2006
Old 02-14-2007 , 21:19   Re: C++ help
Reply With Quote #6

Yeah, Well i got most of it done (thanks Xanimos :p) But im still having trouble with one part. All the ones work besides the first test when you press 1 in the first test.... It exits the program.. But if you hit 0 then 1 it works on the second & third test.. Here my new code:

Code:
//*Britt Jamerson - Gaben, Take or go test! - v1.0*
#include <iostream>
using namespace std;   
int main( void )
{
    cout << "\n A code by Britt Jamerson aka Da_sk8rboy--no0bsawce!" 
            "\n+-----------------------------------------------------------------------+"
            "\n| Welcome to the Gaben take or go test!.                                |"
            "\n| Gaben has stolen your computer and it is up to you to get it back.    | "
            "\n| Gaben say's you must pass the Gaben take or go test! ! !              |"
            "\n+-----------------------------------------------------------------------+";
    bool clamsTaken, picklesTaken, killedByGaben;
    cout << "\n\nYou enter the first chamber."
            "\nIt's full of purple clam's, "
            "you cannot believe."
            "\nDo you take the clam's (1=Yes, 0=No)? ";
    cin >> clamsTaken;
    
    if(clamsTaken) 
    {
        cout << "\nYou keep the clams, but you have failed the first test."
                "\nGame 0ver. . .\n\n";
    }
    else 
    {
        cout << "Congratulations, "
                "you have passed the first test!"
                "\n\nYou enter the second chamber."
                " It is full of shining Pickles! ! !"
                "\nDo you take the shining pickles"
                "(1=Yes, 0=No)?";

        cin >> picklesTaken;

        if(picklesTaken) 
        {
            cout << "You take the Shining Pickles, "
                    "but you have failed the second test!"
                    "\nYou've proven you're GREED. . ."
                    "\nGame 0ver. . .\n\n";
        }
        else
        {
            cout << "Congratulations, you have passed the Second test!"
                    "\n\n You enter the Third chamber. "
                    "\n A no0b is being attacked by a MiniGaben!"
                    "\nDo you ignore the no0b & move on (1=Yes, 0=No)?";

            cin >> killedByGaben;
            if(killedByGaben)
            {
                cout << "\nAs you sneak by, the MiniGaben turn's his attenetion "
                        "to you."
                        "\nHe grabs you & eat's you whole with one bite. . ."
                        "You are now dead."
                        "\nGame 0ver. . .\n\n";
            }
            else
            {
                cout << "Congratualations, you"
                        " have passed all three tests!\n\n"
                        "You exit the chamber & "
                        "confront Gaben.\n\n"
                        "He tries to eat you whole "
                        "but you move on.\n"
                        "With one swing of your trout it is over.\n\n"
                        "You and your computer live happily ever after.\n\n"
                        "The End. . .\n\n";
            }
        }         
        system("PAUSE");
    }
    return 0;
}
If you want i can give you the update .exe To see what i mean?
__________________
i stop around here and there.
Da_sk8rboy is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 00:44.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode