eg0rmaffin

iterated_fctrl_4bts_limit

Jul 5th, 2019
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.36 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int
  4. main ()
  5. {
  6.   int a = 23;
  7.   int runner = 1;
  8.   int b = a;
  9.   if (a == 0)
  10.     {
  11.       printf ("%d", 1);
  12.     }
  13.   else if ((a > 0) && (a < 13))
  14.     {
  15.       while (runner < b)
  16.     {
  17.       a = a * runner;
  18.       runner = runner + 1;
  19.     }
  20.     }
  21.   else if ((a < 0) || (a > 12))
  22.     {
  23.       return 0;
  24.     }
  25.   printf ("%d", a);
  26.  
  27.   return 0;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment