Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main(){
- int x;
- scanf("%d",&x);
- while (x<2||x>100)
- scanf("%d",&x);
- int fact=1;
- while (x>0){
- fact*=x;
- x--;
- }
- printf("%d\n",fact );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement