Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main(){
- int a,b,i,broj,mozhe=0,cifra;
- scanf("%d%d",&a,&b);
- for(i=a;i<=b;i++){
- broj = i;
- mozhe=0;
- while(broj>0){
- cifra=broj%10;
- if(cifra==1 || cifra==3 || cifra==5 || cifra==7 || cifra==9){
- mozhe = 0;
- break;
- }
- mozhe=1;
- broj=broj/10;
- }
- if(mozhe==1){
- printf("%d",i);
- return 0;
- }
- }
- printf("NE");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement