#include<stdio.h>
int main(void){
float R;
long int r1,r2,r3,r4,r5;
int t;
int s;
scanf( "%d",&t );
while ( t>0 ){
scanf( "%d%d%d%d",&r1,&r2,&r3,&r4 );
if ( r2 - r1 == r4 - r3 ){
R = r2 - r1;
r5 = r4 + R;
t = t - 1;
printf( "%d %d %d %d %d\n",r1,r2,r3,r4,r5 );
}
else;
if ( r2 / r1 == r4 / r3 ){
R = r2 / r1;
r5 = r4 * R;
t = t - 1;
printf( "%d %d %d %d %d\n",r1,r2,r3,r4,r5 );
}
}
return 0;
}
-------------------------------------------------------------------------------
#include
int main(void){
float R;
long int r1,r2,r3,r4,r5;
int t;
int s;
scanf( "%d",&t );
while ( t>0 ){
scanf( "%d%d%d%d",&r1,&r2,&r3,&r4 );
if ( r2 - r1 == r4 - r3 ){
R = r2 - r1;
r5 = r4 + R;
t = t - 1;
printf( "%d %d %d %d %d\n",r1,r2,r3,r4,r5 );
}
else;
if ( r2 / r1 == r4 / r3 ){
R = r2 / r1;
r5 = r4 * R;
t = t - 1;
printf( "%d %d %d %d %d\n",r1,r2,r3,r4,r5 );
}
}
return 0;
}
-------------------------------------------------------------------------------
else if 語法錯了