代码如下——
#include<iostream>
using namespace std;
int main()
{
int n, a, b, c, d;
cin >> n;
for (int i = 1; i <= n; i++)
{
cin >> a >> b >> c >> d;
int s1 = (a + c) / 2;
int s2 = d;
int s3 = a;
int s4 = (b + c) / 2;
cout << s1 << " " << s2 << " " << s3 << " " << s4 << endl;
}
}
案例运行结果如下——