Factorial Program in C || What is the factorial of 100 in C

Factorial Program in C

factorial of n (n!) = 1 * 2 * 3 * 4....n
#include<stdio.h>
void main ()
{
    int i,n,factorial=1;

    printf("Enter a number :");
    scanf("%d",&n);

    for (i=1;i<=n;i++){
        factorial=factorial*i;
    }
    printf("The factorial of %d is:%d",n,factorial);

    return 0;
}
INPUT: Enter a number :10
OUTPUT:The factorial of 10 is:3628800

C programming tutorial

FAQ

How do you calculate factorials manually?

To calculate factorials manually, multiply the given number by all positive integers less than itself down to 1.

2 thoughts on “Factorial Program in C || What is the factorial of 100 in C”

  1. Pingback: C programs for Practice | Free Code Center

  2. Pingback: Understanding Conditional Statements in C Programming, If Else in C | Free Code Center

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top
NEW TOXIC ROCKET CYCLE DECK in Clash Royale 2023 Best Deck in Clash Royale Best Deck for Arena 8 in Clash Royale Best Hog deck for Pro players Best Clash Royale Deck