Java Cody had a hard time saving The Programmer from the Hydra, so he decided to
Fantastic news! We've Found the answer you've been seeking!
Question:
Java
Cody had a hard time saving The Programmer from the Hydra, so he decided to call his friends to help him cut off the heads together. This was brilliant because then the number of heads he has to cut would be far less than if he was all alone. For example, if The Hydra had 10 heads and he called 5 friends then they would each cut 2 heads. This presented a problem, however, if The Hydra had 11 heads then that meant one of them had to cut 3 heads.
Input the number of friends Cody has to call and the number of heads the hydra currently has and then print the minimum number of heads each one of them has to cut.
Related Book For
Research Methods For Business Students
ISBN: 9781292208787
8th Edition
Authors: Mark Saunders, Philip Lewis, Adrian Thornhill
Posted Date: