a005.
Eva 的回家作業
--
POJ
| From: [1.173.209.6] |
發表日期
:
2012-12-24 22:53
#include<stdio.h>
int main(){
int a,b,c,d;
while(scanf("%d%d%d%d",&a,&b,&c,&d)==4)
if(a+d==b+c)
printf("%3d%3d%3d%3d%3d\n",a,b,c,d,d+b-a);
else if(a*d==b*c)
printf("%3d%3d%3d%3d%3d\n",a,b,c,d,d*(b/a));
else 0;
}