Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- test1|test2
- input:32|56
- output:0|1
- */
- #include <stdio.h>
- #include <stdlib.h>
- int func(int br){
- int cifra;
- if(br<=0)return 0;
- cifra = br%10;
- if(cifra%5==1) return 1;
- func(br/10);
- }
- int main()
- {
- int n, x=0;
- scanf("%d", &n);
- x = func(n);
- if(x)printf("1");
- else printf("0");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement