解题思路:
注意事项:
参考代码:
#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 人评分
C二级辅导-公约公倍 (C语言代码)浏览:1549 |
C语言程序设计教程(第三版)课后习题6.9 (C语言代码)浏览:805 |
printf基础练习2 (C语言代码)浏览:796 |
求圆的面积 (C语言代码)浏览:1755 |
1012题解浏览:938 |
A+B for Input-Output Practice (III) (C语言代码)浏览:594 |
C语言程序设计教程(第三版)课后习题10.3 (C语言代码)浏览:523 |
C语言程序设计教程(第三版)课后习题11.8 (C语言代码)浏览:756 |
C语言程序设计教程(第三版)课后习题11.5 (C语言代码)浏览:1029 |
C语言程序设计教程(第三版)课后习题8.3 (C语言代码)浏览:465 |