| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
求大神帮看为啥第二个for循环不起效果#include<stdio.h>
#include<stdlib.h>
#define pi 3.1415926
int main(void)
{
int j,i,N,k=1;
float strx[1000],stry[1000];
scanf("%d",&N);
for(i=0;i<N;i++)
{
scanf("%f%f",&strx[i],&stry[i]);
}
for(j=1;j<=N;j++)
{
if(100*j>(pi*(strx[j-1]*strx[j-1]+stry[j-1]*stry[j-1])))/*此处极易丢括号*/
{
printf("Property %d: This property will begin eroding in year %d.\n",k++,j);
}
}
printf("END OF OUTPUT.\n");
system("PAUSE");
return 0;
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator