Advertisement
mfaisalpasha

Factorial

Aug 23rd, 2014
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.14 KB | None | 0 0
  1. #‎include‬ <stdio.h>
  2. int main ()
  3. {
  4. int a, b=1, c=1;
  5. scanf("%d", &a);
  6. while (b <= a){
  7. c=c*b;
  8. b++;
  9. }
  10. printf("%d", c);
  11. return 0;
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement