#include <stdio.h> double fun(int m); void main() { int m; printf("enter an number:\n"); scanf("%d",&m); printf("%lf",fun(m)); } double fun(int n) { double t=1; int i; for (i=2;i<=n;i++) t=t-1/double(i); return t; }