Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main(void){
- int a, b, tmp, sum, count=0;
- scanf("%d %d", &a, &b);
- for(int i=a; i<=b; i++){
- tmp = i;
- sum = 0;
- while(tmp){
- if((tmp%10)%2==0 && (tmp%10)%3!=0)
- sum += tmp%10;
- tmp /= 10;
- }
- if(sum>0 && sum%7 == 0){
- printf("%d\n", i);
- count++;
- }
- }
- printf("Vkupno: %d", count);
- }
Add Comment
Please, Sign In to add comment