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;
}
}
|