Factorial in c program using for loop?

1 answer

Answer

1136922

2026-04-18 22:25

+ Follow

#include<stdio.h>

#include<conio.h>

void main()

{

int i,n,fact=1;

clrscr();

printf("enter the number");

scanf("%d",&n);

for(i=1;i<=n;i++)

printf("%d",n);

fact=fact*i;

{

printf("the factorial is=%d",fact);

}

getch();

}

By:-Abhishek Goyal(goyal.abhi40@Yahoo.com)

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.