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