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 |
好水的题。。。#include<iostream> using namespace std; int main() { int i; double s=2.5,t,m; cout<<"n e"<<endl; cout<<"- -----------"<<endl; cout<<"0 1"<<endl<<"1 2"<<endl<<"2 2.5"<<endl; for(i=3;i<10;i++) { m=1; for(t=i;t>0;t--) m/=t; s+=m; printf("%d %.9f\n",i,s); } return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator