解题思路:
注意事项:
参考代码:
#include<bits/stdc++.h>
using namespace std;
void sc (int a,int b, int c)
{
cout << a << " " << b << " " << c << endl;
cout << a << " " << c << " " << b << endl;
cout << b << " " << a << " " << c << endl;
cout << b << " " << c << " " << a << endl;
cout << c << " " << a << " " << b << endl;
cout << c << " " << b << " " << a << endl;
}
int main()
{
int a[5];
//赋值数组
for(int i = 1; i<=4; i++)
{
cin >> a[i];
}
//获取第一位数
for(int i = 1; i<=2; i++)
{
int q,w,e;
q = a[i];
//获取第二位数
for(int j = i+1; j<=3; j++)
{
w = a[j];
//获取第三位数
for(int c = j+1; c<=4; c++)
{
e = a[c];
sc(q,w,e);
}
}
}
return 0;
}
0.0分
0 人评分