| ||||||||||
| 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 | |||||||||
Re:麻烦大家帮我看看问题在哪里呀?运行结果就不对啊~In Reply To:麻烦大家帮我看看问题在哪里呀?运行结果就不对啊~ Posted by:qiuxinbaby at 2012-07-23 21:26:59 > #include <stdio.h>
> #include <stdlib.h>
> #include <math.h>
> #define PI 3.141592654
>
> int main()
> {
> int N;
> scanf(" %d \n", &N);
> int i;
> int year[N];
> double x[N];
> double y[N];
> double r[N];
> for ( i = 1; i <= N ; i ++ )
> {
> scanf("%.1d %.1d", &x[i], &y[i]);
> r[i] = x[i] * x[i] + y[i] * y[i] ;
> year[i] = floor (PI * r[i] / 100) + 1;
> printf ("Property %d: This property will begin eroding in year %d\n", i, year[i]);
> }
> 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