/*
Time:2019.11.8
Author: Goven
type:模拟
err:
ref:
*/
#include<iostream>
using namespace std;
int main()
{
printf("n e\n- -----------\n0 1\n1 2\n2 2.5\n");
double e = 2.5;
int jc = 2;
for (int i = 3; i < 10; i++) {
jc *= i;
e += 1.0 / jc;
printf("%d %.9lf\n", i, e);
}
return 0;
}
网友评论