# include <stdio.h> void main () { double result,a[15]; int i; for (i=0;i<15;i++) scanf ("%lf",&a[i]); for (i=0;i<14;i++) result=a[i]/a[i+1]; printf ("the result is %lf\n",result); }
上面的是错的 # include <stdio.h> void main () { double result,a[15]; int i; for (i=0;i<15;i++) scanf ("%lf",&a[i]); result =a[0]; for (i=1;i<15;i++) result=result/a[i]; printf ("the result is %lf\n",result); }