JS exercise 10.4
Hi there! In the exercise 10.4 we're supposed to use the % operator to basically check if the number is divided by zero. Here's the exercise: /* Volunteers have been divided into 5 groups with equal number of members. If any group has fewer than 5 people, more volunteers must be recruited to fill the empty spots. Write a program that takes the number of volunteers and outputs to the console how many volunteers need to be hired to have 5 equal groups. Sample Input 24 Sample Output 1 Explanation The nearest number to 24 that is multiple of 5 is 25, so we need 1 more volunteer (24+1=25) to get 5 equal groups. */ The only solution presented is with ? : - which we haven't learned at this point in this course, so I'm trying and would like to solve it with if, but can't seem to do it. Could anyone help me here? Thanks!