| ||||||||||
| 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 | |||||||||
30题萌新AC留念#include<stdio.h>
int main()
{
double sum=0;
printf("n e\n- -----------\n");
int i = 0;
for(;i<10;i++)
{
int temp= 1;
for(int j = 1;j<=i;j++)
{
temp = temp*j;
}
sum+=1.0/temp;
if(i ==0) printf("0 1\n");
else if(i ==1) printf("1 2\n");
else if(i ==2) printf("2 2.5\n");
else
printf("%d %.9lf\n",i,sum);
}
return 0;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator