#include <stdio.h> int main () { int a,flag=1; double sum; for(a=1;a<=100;a++) { sum+=flag*1.0/a; flag=-flag; } printf("%lf\n",sum); return 0; }