Question bank › Math
Dsa Math Medium

Factorial Digit Sum

Write a program that takes an integer N as input and calculates the sum of the digits of N!. For instance, if N is 5, N! equals 120, and the sum of the digits (1 + 2 + 0) equals 3. The program should read N and print the digit sum of N!. Input Format: - A single integer N (0 <= N <= 100). Output Format: - A single integer: the sum of the digits of N!. Example: Input: 5 Output: 3

Key concepts

mathfactorialdigit-sum

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
Part of InterviewLab's verified interview question bank. We show the prompt and concepts to practise with — never a copy-paste solution.