+ 1
Popsicles java
Realice el desafĂo de popsicles y no entiendo porque la verificar en un caso me dice error, alguna ayuda? https://code.sololearn.com/cx6HMkLyjIqp/?ref=app
7 Answers
0
I used
popsicles%siblings==0
Instead of popsicle - sibling
0
% (modulus) gives us the remainder when dividing two numbers
Like 4%2 will give 0 (as 4 is divisible by 2)
But 5%2 will give 1(as it is remainder)
So in popsicle question if you can give all siblings then only you will distribute
So numbers of popsicles should be divisible by number of children (remainder should be 0)
Use popsicles%siblings==0
- 1
Hola cesar que tal, pudiste resolver el ejercicio? Estoy igual que tu
- 1
Si , era cambiar algo , mira https://www.sololearn.com/coach/3?ref=app
- 1
El link que mandaste me envĂa a el ejercicio, no puedo ver lo que escribiste
- 2
Code works on my side, just input your numbers in separate lines like this:
7
12
- 3
Yes, but, what is the diferrence to declare in other variable?