Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main(){
- int A, B;
- scanf("%d%d", &A, &B);
- for(int i = A; i <= B; i++) {
- int broj = i;
- int blag_broj = 1;
- while(broj > 0) {
- int posledna_cifra = broj % 10;
- if(posledna_cifra % 2 != 0) {
- blag_broj = 0;
- }
- broj /= 10;
- }
- if(blag_broj == 1) {
- printf("%d ", i);
- return 0;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement