Advertisement
masterm1nd99

pppp

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