Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2020
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function solve(input){
  2.  
  3. let [totalVoters, firstPercent, secondPercent, notGoing] = input
  4.  
  5. console.log(`Party 28.02: ${(100 / totalVoters) * firstPercent}%`);
  6. console.log(`Party 06.03: ${(100 / totalVoters) * secondPercent}%`);
  7. console.log(`Not going: ${(100 / totalVoters) * notGoing}%`);
  8.  
  9. }solve([20, 10, 5, 5])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement