I only want the number of cannibals to decrease if the number of missionaries decrease by a whole number. Ex.30 missionaries, 10 cannibals. 29 Missionaries, 9 cannibals. 28.1 missionaries, 9 cannibals. 28 Missionaries, 8 cannibals. I've tried everything I can think of and I can figure out how to program it to do so. Any suggestions?
Let's suppose that at some point numFullMissionaries=25. If numMissionaries is 24.3 you still have 0.3 missionaries left before you decrease the number of cannibals. If numMissionaries is 23.8, it means that you already eat one complete missionary, so numFullMissionaries=24 and you decrease the number of cannibals