Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

Re:为什么总是编译错误呢,高手指点一下,谢谢啦

Posted by T_mon at 2009-03-25 21:17:13 on Problem 1005
In Reply To:为什么总是编译错误呢,高手指点一下,谢谢啦 Posted by:hellozhangmeng at 2009-03-25 20:17:12
> //北大OJ1005,土地腐蚀,每年50平方英里,半圆形 
> 
> #include<stdio.h>
> int main()
> {
>     int N,Z,i,j,k; 
>     scanf("%d",&N);
>     float a[N][2];      // 数组大小给定阿
>    
>     for(i=0;i<N;i++)
>     {
>        scanf("%f %f",&a[i][0],&a[i][1]);           
>     }
>     
>     for(k=0;k<N;k++)
>     {
>         printf("Property %d: This property will begin eroding in year ",k+1);
>          j=0;
>          while(j>=0)
>          {
>               if(100*j/3.14<a[k][0]*a[k][0]+a[k][1]*a[k][1]&&100*(j+1)/3.14>a[k][0]*a[k][0]+a[k][1]*a[k][1]) 
>               {
>                    Z=j+1;
>                    break;                                                                                             
>               }
>               j=j+1;            
>          } 
>          printf("%d.\n",Z);              
>     }
>     printf("END OF OUTPUT.\n");
>     
>     return 0;
> } 

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator