#include <iostream>
using namespace std;
int main() {
int a, b, c, d, e = 0, t,i;
cin >> t;
for (i=0;i<t;i++)
cin >> a >> b >> c >> d;
if (b - a == c - b) {
e = d + d - c;
}
else{
e = d * (d / c);
}
cout << a << " " << b << " " << c << " " << d << " " << e << endl;
}
#include
using namespace std;
int main() {
int a, b, c, d, e = 0, t,i;
cin >> t;
for (i=0;i
cin >> a >> b >> c >> d;
if (b - a == c - b) {
e = d + d - c;
}
else{
e = d * (d / c);
}
cout << a << " " << b << " " << c << " " << d << " " << e << endl;
}
for迴圈少了大括號