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