Smart elves and fun program! However, by using the ROUND function, there is a small probability of getting u=0. Have…