Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function solve(input){
- let [totalVoters, firstPercent, secondPercent, notGoing] = input
- console.log(`Party 28.02: ${(100 / totalVoters) * firstPercent}%`);
- console.log(`Party 06.03: ${(100 / totalVoters) * secondPercent}%`);
- console.log(`Not going: ${(100 / totalVoters) * notGoing}%`);
- }solve([20, 10, 5, 5])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement