Advertisement
Guest User

Untitled

a guest
Feb 26th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. #include<stdio.h>
  2. main()
  3. {
  4. int n,fact=1,i=1,c=0,num;
  5. scanf("%d",&n);
  6. while(i<=n)
  7. {
  8. fact=fact*i;
  9. i++;
  10. }
  11. printf("%d",fact);
  12. num=fact;
  13. while((num%10)==0)
  14. {
  15. if((num%10)==0)
  16. {
  17. c++;
  18. }
  19. num=num/10;
  20. }
  21. printf("\n%d",c);
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement