C Programming Code Examples C > Mathematics Code Examples C Program to Find the Sum of H.P Series C Program to Find the Sum of H.P Series This C Program calculates the the sum of H.P series. This program is used to find the sum of the harmonic progression series. Here H.P stands for harmonic progression. Harmonic progression is a progression formed by taking the reciprocals of an arithmetic progression. #include <stdio.h> void main() { int n; float j, sum, term; printf("1 + 1 / 2 + 1 / 3 +......+1 / n \n"); printf("Enter the value of n \n"); scanf("%d", &n); sum = 0; for (j = 1; j <= n; j++) { term = 1 / j; sum = sum + term; } printf("the Sum of H.P Series is = %f", sum); }