2009-10-22 18:24:58來源不明

好熱好熱

作法:

等差導解

/*******************************************************/

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

main()  
{  
 double x1,x2,x3,t1,t2,t3;
 while(scanf("%lf %lf %lf %lf %lf",&t1,&t2,&t3,&x1,&x3)==5)
      {
        if(t3==t1) printf("%lf\n",x1);
        else
        printf("%lf\n",x1+(x3-x1)/(t3-t1)*(t2-t1));
      }
  return 0;  
}  

上一篇:星級青蛙

下一篇:hello, world