Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int blag(int n)
- {
- int cifra;
- int tmp = n;
- while(tmp != 0)
- {
- cifra= tmp % 10;
- if(cifra % 2 != 0)
- {
- return 0;
- }
- tmp /= 10;
- }
- return 1; //blag e!
- }
- int main()
- {
- int n,m,i;
- int flag = 1;
- int bb = 0;
- scanf("%d%d", &n,&m);
- for(i=n;i<=m;i++)
- {
- if(!blag(i))
- {
- flag = 0;
- } else {
- flag = 1;
- bb = i;
- break;
- }
- }
- if(flag)
- printf("%d", bb);
- else
- printf("NE");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement