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

为什么总是runtime error阿?

Posted by zrl at 2006-07-16 09:28:00 on Problem 1799
#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:
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