The force, in N, applied to the cannonball can be calculated using Newton's Second Law of Motion, which states that the force applied to an object is equal to its mass times its acceleration:
Force = mass x acceleration
Plugging in the given values, we get:
Force = 5 kg x 8 m/s^2 = 40 N
Therefore, the force applied to the cannonball was 40 N.