+ 1

Can someone help?

I'm rather new and I don't have a good understanding of solving problems. I don't know how to solve that Problem: Splitting them evenly to the sibling, of not eat them yourself. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SoloLearn { class Program { static void Main(string[] args) { int siblings, popsicles; siblings = Convert.ToInt32(Console.ReadLine()); popsicles = Convert.ToInt32(Console.ReadLine()); //your code goes here } } } }

19th May 2022, 3:42 PM
Felix Alcor
Felix Alcor - avatar
2 odpowiedzi
+ 2
If you want to get help from us, you need to give us the complete task description or mention at least that it is the Code Coach Popsicle task. You can determine if the number of popsicles is divisible by using the modulo operator % if x % siblings == 0 we know that each siblings can get the same number of popsicles
19th May 2022, 4:36 PM
Lisa
Lisa - avatar
0
Thanks I will remember it for the next time.
19th May 2022, 4:41 PM
Felix Alcor
Felix Alcor - avatar