这道水题中两个数的存储,有点像以前见过的斐波那契数的存储
#include<stdio.h>
int main()
{
double f1,f2,diff;
scanf("%lf",&f1);
if(f1==999.0)
printf("End of Output");
else
while(1)
{
scanf("%lf",&f2);
if(f2==999.0)
{
printf("End of Output");
break;
}
else
{
diff=f2-f1;
printf("%.2lf\n",diff);
f1=f2;
}
}
return 0;
}