VOL University has conducted two table tennis team competition, each out of three people. Team A is A, B, C three, B team for the X, Y, Z three persons to draw lots to decide the game list, a list of the game was to find out the players, A and X said he did not than, C and X said he did not , Z ratio, write a program to find three pairs of racers list.
#include <iostream>
using namespace std;
int main()
{
char i,j,k;
for (i='X';i<='Z';i++)
{
for (j='X';j<='Z';j++)
{
if (i!=j)
{
for (k='X';k<='Z';k++)
{
if (i!=k && j!=k)
{
if (i!='X' && k!='X' && k!='Z')
{
cout<<"A--"<<i<<" B--"<<j<<" C--"<<k<<endl;
}
}
}
}
}
}
}