The Word Game, C++ edition!

Whether you're a newbie or an experienced programmer, any questions, help, or just talk of any language will be welcomed here.

Moderator: Coders of Rage

User avatar
lotios611
Chaos Rift Regular
Chaos Rift Regular
Posts: 160
Joined: Sun Jun 14, 2009 12:05 pm
Current Project: Game engine for the PC, PSP, and maybe more.
Favorite Gaming Platforms: Gameboy Micro
Programming Language of Choice: C++

Re: The Word Game, C++ edition!

Post by lotios611 »

Code: Select all

#include <iostream>
#include <ctype.h> //tolower() anyone? ;) lol hellz yeah
int main()
{
    bool exit=false;
    int i = 100;

    while (exit == false)
    {
        std::cout << "Welcome to the Elysian Shadows Word Game!\n\n";

        std::cout << "Let's go dawg! Ready? (Enter Y or N)" << std::endl;
        char answer;
        std::cin >> answer;

       if (tolower(answer) == 'n' || tolower(answer) != 'y') //This was really bugging me.
       {
       }
       else
       {
       }

        if(i <= 0) {
          exit = true;
      }
      
       i-=1;
    }
    return 0;
}
"Why geeks like computers: unzip, strip, touch, finger, grep, mount, fsck, more, yes, fsck, fsck, fsck, umount, sleep." - Unknown
Post Reply