Factorial till N Without recursion!!
Aafthab Ali Shaik

Aafthab Ali Shaik @aafthab_ali

About: Building!

Joined:
Mar 7, 2025

Factorial till N Without recursion!!

Publish Date: Mar 18
0 0

Image description

#include <stdio.h>

int main()
{
    int n,count;
    scanf("%d",&n);
    count =1;
    for(int i =1;i<=n;i++){
        count *=i;
    }
    printf("%d",count);

    return 0;
}
Enter fullscreen mode Exit fullscreen mode

as we know recursion is used to call a function to itself
and here this is a code without using recursion!! it is able to find the factorial till n!! to understand more about recursion check my previous factorial code using recursion or do message!! :)

Comments 0 total

    Add comment