0

JavaScript Volunteers Team question

Hello everyone, here is the question (which I think should be worked out without “else if” as Sololearn has not taught us at this part yet)

19th Jul 2021, 9:35 AM
YANG Fei
YANG Fei - avatar
2 Answers
+ 2
But you can use ternary operator instead :) Did you try? https://www.sololearn.com/learn/Javascript/1133/
19th Jul 2021, 11:10 AM
Simba
Simba - avatar
0
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.
19th Jul 2021, 9:35 AM
YANG Fei
YANG Fei - avatar