#5798: 想請問一下


kingweirong (全人類的非想天則~)


#include<stdio.h>
#include<stdlib.h>

main()
{
int a,b,c,e;

while(scanf("%d%d%d%d",&a,&b,&c,&e))
     {if(a+e==b+c)
         {
              printf("%d%d%d%d%d\n",a,b,c,e,e+b-a);
         }
         else if(a*e==b*c)
         {
              printf("%d%d%d%d%d\n",a,b,c,e,e*(b/a));
         }
     }
  
}
 
 
不知道為什麼一直TLS
想請各位高手幫幫忙>< 
#5803: Re:想請問一下


Jhang (jyjhang)


#include
#include

main()
{
int a,b,c,e;

while(scanf("%d%d%d%d",&a,&b,&c,&e))
     {if(a+e==b+c)
         {
              printf("%d%d%d%d%d\n",a,b,c,e,e+b-a);
         }
         else if(a*e==b*c)
         {
              printf("%d%d%d%d%d\n",a,b,c,e,e*(b/a));
         }
     }
  
}
 
 
不知道為什麼一直TLS
想請各位高手幫幫忙>< 


測資的第一行是數列的數目

數字的中間要用空白隔開喔~~~