#include<stdio.h> double fun(int n) { int i; double sum = 0.0; for(i = 1; i <= n; i++) if(i % 5 == 0 || i % 10 == 0) sum += 1.0 / i; return sum; } int main() { printf("%f\n", fun(100)); return 0; }