#29860: C++不會的看這


s040726@apps.ntpc.edu.tw (康康♪(^ω^*))


#include <iostream>

using namespace std;
int main() {

int a, b, c, d, e = 0, t;

cin >> t;

while (t--) {

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;

}

}
#29958: Re:C++不會的看這


roychuang (莊鎮宇)


林康旖(ㄑㄧˊ)