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 |
求大神看看我程序错在哪里。。#include <stdio.h> #include <stdlib.h> #define pi 3.14159265358979323846264338327950288 int k=0; double r; int n; double sqare; int main( ) { int i; double x,y; scanf("%d",&n); for (i=1;i<=n;i++) { scanf("%lf%lf",&x,&y); r=x*x+y*y; k=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"); 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