Guest User

Untitled

a guest
Feb 17th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. ou're given two integers – n and k. n is always positive, while k >= 0. Write a function that returns first k odd digits in a number n.
  2.  
  3. The output should also be an integer.
  4.  
  5. In the following cases a function should return 0:
  6.  
  7. there are no odd digits in a number n;
  8. k is bigger than a number of digits in n;
  9. k = 0;
  10. k is bigger than a number of odd digits in n.
  11. BTW, is 0 an odd number or an even one?
Add Comment
Please, Sign In to add comment