Sie sind auf Seite 1von 1

#include<stdio.h> #include<conio.

h>

void main() { int i,n,f=1; clrscr(); printf("Enter the value of n:"); scanf("%d",&n);

for(i=1;i<=n;i++) { f=f*i; }

printf("\n The factorial of a number is:%d",f); getch(); }

Das könnte Ihnen auch gefallen