tarunsinghofficial / HacktoberFest

:octocat: Add your Programs or tech content to help other contributors ✅
383 stars 2.3k forks source link

Create factorial.c #2756

Open Sanskar-letsget opened 8 months ago

Sanskar-letsget commented 8 months ago

include

int main() { int n,pdt=1; printf("enter the number"); scanf("%d",&n); for(int i=1;i<=n;i++) { pdt=pdt*i; } printf("The factorial value is %d",pdt); return 0; }