Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int proizvod(int n)
- {
- int br=0, pro=1;
- while(n)
- {
- br++;
- if(br%2==0)
- pro*=n%10;
- n/=10;
- }
- return pro;
- }
- int main()
- {
- int n;
- scanf("%d",&n);
- printf("%d", proizvod(n));
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement