Page 2 of 2

Re: The Word Game, C++ edition!

Posted: Tue Aug 03, 2010 10:46 am
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;
}