//---------------------------------------------------------------------------
#include
#include<罩则宏math.h>
void main()
{int i,b;
float yf=28; /*注意这里*/
float x[13]={320,310,297.5,285,270,255,237.5,217.5,197.5,175,150,122}; /*注意这物册里*/
float y[13]={56,40,33,25,24,20,20,19,16,15,14,12}; /盯正*注意这里*/
double a,r[13];
r[0]=sqrt(x[0]*x[0]+y[0]*y[0]/4);
a=r[0];
for(i=1;i<14;i++)
{ yf=yf+y[i]; /*注意这里*/
r[i]=sqrt(x[i]*x[i]+yf*yf); /*注意这里*/
if(a>r[i])
{
a=r[i];
b=i;
}
printf("%d %f\n",b,a);
} /*注意这里*/
}
//---------------------------------------------------------------------------
void main()必被警告
宁愿写main()都不要写void main()