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 S_R_N at 2014-03-18 00:26:37 on Problem 1005
In Reply To:求大神看看我程序错在哪里。。 Posted by:yzl427 at 2012-07-24 21:17:47
#include <stdio.h>
#include <stdlib.h>
#define pi 3.14159265358979323846264338327950288 
int k=0;
double r;
int n; 
double sqare; 
int main( )
{
     int i; 
     float x,y; 
     scanf("%d",&n);
     for (i=1;i<=n;i++)
       {
           scanf("%f%f",&x,&y);
           r=x*x+y*y;
           k=0; 
		   sqare=0.0; 
           while (r>sqare)
           {
              sqare=1.0; 
               k++;
               sqare=sqare*100*k/pi;
           } 
           printf("Property %d: This property will begin eroding in year %d.\n",i,k); 
       }
     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