View Single Post
  #8 (permalink)  
Old July 19th, 2005, 01:21 AM
kumar_raj13 kumar_raj13 is offline
Authorized User
 
Join Date: Jul 2005
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to kumar_raj13
Default

Hello Friend
Try the Code Written Below.OK

#include <iostream.h>
#include<string.h>
void main()
    {
      char[10] x;
      cout << "Pick a word: ";
      cin >> x;
      if (strcmp(x,"lottery"))
      {
        cout << "You win the C++ lottery!" << endl;
        cout << "Thank you for playing the C++ lottery" << endl;
      }
      else
      {
        cout << "Thank you for playing the C++ lottery" << endl;
      }
    }
Reply With Quote