#include <stdio.h> int main() { int k=1,t=1; double s=1,a=1; while(a>=1e-9){ k=k*t; a=1.0/k; s+=a; t++; } printf("%f",s); return 0; }