Program in C + + to test with Artificial Intelligence.