Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- int n,m,i,fact=1;
- printf("Input the Number: ");
- scanf("%d",&n);
- int ara[n];
- for(m=n, i=0 ; i<n ; i++, m--)
- ara[i]=m;
- for(i=0 ; i<n ; i++)
- fact*=ara[i];
- printf("%d! = %d",n,fact);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement