/* * Author: Amit Dutta (amitdutta4255@gmail.com) | Date: 12 Dec 2025 * Repo: https://github.com/notamitgamer/bsc * License: MIT */ /* Write a program to add first seven terms of the following series using a for loop. 1 / 1! + 2 / 2! + 3 / 3! + ... */ /* Let Us C, Chap - 6, Page - 102, Problem 6.2 */ #include #define N 7 // update N here int main() { double sum = 0; int fact = 1; for (int i = 1; i <= N; i++) { fact *= i; sum += (double)i / fact; } printf("Sum of the series : %g", sum); return 0; }