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