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 |
为什么总是runtime error阿?#include<stdio.h> #include<math.h> #define pi acos(-1) main() {int i,n[20],num; float r[20]; scanf("%d",&num); for(i=1;i<=num;i++) {scanf("%f%d",&r[i],&n[i]); if(r[i]<1||r[i]>100||n[i]<2||n[i]>100){i--;continue;}} for(i=1;i<=num;i++) {printf("Scenario #%d:\n%.3f\n\n",i,r[i]*sin(pi/n[i])/(1+sin(pi/n[i])));} } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator