sandra0309

vezba5

Dec 7th, 2014
150
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. int main ()
  3. //proizvod na neparen n
  4. {
  5. int i,n,proizvod=1;
  6. scanf("%d",&n);
  7. for (i=1;i<=n;i++)
  8. {
  9.   if (i%2!=0)
  10.   {
  11.    proizvod=proizvod*i;
  12.   }
  13. }
  14. printf("%d",proizvod);
  15. return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment