Nasao sam neki sajt sa zadacima iz jave pa sam dosta resio a nekoliko njih ne znam da resim-tacnije ne razumem sta hoce pesnik time da kaze :)))).Evo npr. ovaj:
We'll say that a positive int divides itself if every digit in the number divides into the number evenly. So for example 148 divides itself since 1, 4, and 8 all divide into 148 evenly. We'll say that 0 does not divide into anything evenly, so no number with a 0 digit divides itself. Note: use % to get the rightmost digit, and / to discard the rightmost digit.
dividesSelf(128) → true
dividesSelf(12) → true
dividesSelf(120) → false
Ako neko ima neko reselje bilo bi lepo podeliti sa nama B-).
Hvala puno.
We'll say that a positive int divides itself if every digit in the number divides into the number evenly. So for example 148 divides itself since 1, 4, and 8 all divide into 148 evenly. We'll say that 0 does not divide into anything evenly, so no number with a 0 digit divides itself. Note: use % to get the rightmost digit, and / to discard the rightmost digit.
dividesSelf(128) → true
dividesSelf(12) → true
dividesSelf(120) → false
Ako neko ima neko reselje bilo bi lepo podeliti sa nama B-).
Hvala puno.