sandra0309

vezba6

Dec 7th, 2014
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.21 KB | None | 0 0
  1. #include<stdio.h>
  2. //proizvod na neparen n
  3. int main ()
  4. {
  5. int i,n,proizvod=1;
  6. scanf("%d",&n);
  7. i=1;
  8. while(i<=n)
  9. {
  10.  if (i%2!=0)
  11.  {
  12.   proizvod=proizvod*i;
  13.  }
  14. i++;
  15. }
  16. printf("%d",proizvod);
  17. return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment