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 |
bu zhi dao zen me cuo le#include <iostream> #include <stdlib.h> #include <stdio.h> using namespace std; int main() { float t; double sum; sum=2; t=1; printf("n e\n"); printf("- -----------\n"); for(int i=0;i<=9;i++) { if(i==0)printf("0 1\n"); else if(i==1)printf("%d %.0lf\n",i,sum); else { t=t*i; sum=sum+1.0/t; if(i==2)printf("%d %.1lf\n",i,sum); 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