/*
*借书方案:小明有五本新书,要借给A,B,C三位小朋友,若每人每次只能借一本,则可以有多少种不同的借法?
*/
#include<iostream>
using namespace std;
int main()
{
char i,j,k;
char book[5]={'A','B','C','D','E'};//代表5本书
int count=0;
for(i='A';i<='E';i++)
{ for(j='A';j<='E';j++)
if(i!=j)//确保不重复
for(k='A';k<='E';k++)
if(i!=k && j!=k)//确保不重复
{ count++;//记录次数
cout<<"the" <<count<<"possible condition is: "<<endl;
cout<<"A---"<<i<<endl;
cout<<"B---"<<j<<endl;
cout<<"C---"<<k<<endl;
}
cout<<endl;}
return 0;
}