#18382: EVA的回家作業


asd080123456@gmail.com (di o)

學校 : 不指定學校
編號 : 99031
來源 : [140.130.35.183]
最後登入時間 :
2020-11-18 09:01:27
a005. Eva 的回家作業 -- POJ | From: [27.247.135.245] | 發表日期 : 2019-07-08 12:24

#include <iostream>

using namespace std;

 

int main()

{

int n,a,b,c,d;

cin >> n;

while (cin >> a >> b >> c >> d){

if ((b-a) == (d-c)){

int e;

cin >> e;

e = d+(d-c);

cout << a << " " << b << " " << c << " "<< d << " " << e << " " << endl;

}

else if (b/a == d/c){

int e;

cin >> e;

e = d*(d/c);

cout << a << " " << b << " " << c << " "<< d << " " << e << " " << endl;

}

}

return 0;

}

 

 

我還蠻好奇為甚麼只能輸出一行的  是while不能用在這題還是?

 
ZeroJudge Forum