Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function gymnastics(input){
- let country = input[0];
- let staff = input[1];
- if (country == 'Bulgaria'){
- if (staff == 'ribbon'){
- let task = 9.600 + 9.400;
- let gets = 20 - task;
- let percent = (gets / 20) * 100;
- console.log(`The team of ${country} get ${task.toFixed(3)} on ${staff}.`);
- console.log(`${percent.toFixed(2)}%`);
- } else if (staff == 'hoop'){
- let task = 9.550 + 9.750;
- let gets = 20 - task;
- let percent = (gets / 20) * 100;
- console.log(`The team of ${country} get ${task.toFixed(3)} on ${staff}.`);
- console.log(`${percent.toFixed(2)}%`);
- } else if(staff = 'rope'){
- let task = 9.500 + 9.400;
- let gets = 20 - task;
- let percent = (gets / 20) * 100;
- console.log(`The team of ${country} get ${task.toFixed(3)} on ${staff}.`);
- console.log(`${percent.toFixed(2)}%`);
- }
- } else if (country == 'Russia'){
- if (staff == 'ribbon'){
- let task = 9.100 + 9.400;
- let gets = 20 - task;
- let percent = (gets / 20) * 100;
- console.log(`The team of ${country} get ${task.toFixed(3)} on ${staff}.`);
- console.log(`${percent.toFixed(2)}%`);
- } else if (staff == 'hoop'){
- let task = 9.300 + 9.800;
- let gets = 20 - task;
- let percent = (gets / 20) * 100;
- console.log(`The team of ${country} get ${task.toFixed(3)} on ${staff}.`);
- console.log(`${percent.toFixed(2)}%`);
- } else if(staff = 'rope'){
- let task = 9.600 + 9.000;
- let gets = 20 - task;
- let percent = (gets / 20) * 100;
- console.log(`The team of ${country} get ${task.toFixed(3)} on ${staff}.`);
- console.log(`${percent.toFixed(2)}%`);
- }
- } else if (country == 'Italy'){
- if (staff == 'ribbon'){
- let task = 9.200 + 9.500;
- let gets = 20 - task;
- let percent = (gets / 20) * 100;
- console.log(`The team of ${country} get ${task.toFixed(3)} on ${staff}.`);
- console.log(`${percent.toFixed(2)}%`);
- } else if (staff == 'hoop'){
- let task = 9.450 + 9.350;
- let gets = 20 - task;
- let percent = (gets / 20) * 100;
- console.log(`The team of ${country} get ${task.toFixed(3)} on ${staff}.`);
- console.log(`${percent.toFixed(2)}%`);
- } else if(staff = 'rope'){
- let task = 9.700 + 9.150;
- let gets = 20 - task;
- let percent = (gets / 20) * 100;
- console.log(`The team of ${country} get ${task.toFixed(3)} on ${staff}.`);
- console.log(`${percent.toFixed(2)}%`);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement