Dsa
Math
Easy
Factorial Sum
Write a program to compute the sum of factorials of the first `n` natural numbers. The program should read a single integer `n` (1 <= n <= 20).
Input format:
Single integer `n`.
Output format:
Single integer, the sum of factorials from 1 to `n`.
Example:
Input:
4
Output:
33
Key concepts
mathfunctions
Practise this out loud — free
Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.
🎙 Practise this question now