| ||||||||||
| 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 | |||||||||
哪位打牛帮我赵赵错呀!怎么就wa了?#include<stdio.h>
#include<math.h>
double f(int n)
{
double s,t;
s=3.14/n;
t=sin(s);
return t/(1+t);
}
void main()
{
int a[100],i,n;
double b[100];
scanf("%d",&n);
for(i=1;i<=n;i++)
scanf("%lf %d",&b[i],&a[i]);
for(i=1;i<=n;i++)
printf("Scenario #%d:\n%.3f\n\n\n",i,f(a[i])*b[i]);
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator