Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function x (input){
- let tsenaNaTeniska = Number(input [0]);
- let SumaKoqtoTrqbvaZaTopka = input [1]
- let shorti = tsenaNaTeniska * 0.75
- let chorapi = shorti * 0.2
- let butonkite = 2 * (tsenaNaTeniska + shorti)
- let sum = tsenaNaTeniska + shorti + chorapi + butonkite
- let sumwithItstipka = sum * 0.85
- if (sumwithItstipka >= SumaKoqtoTrqbvaZaTopka){
- console.log("Yes, he will earn the world-cup replica ball!");
- console.log(`His sum is ${sumwithItstipka.toFixed(2)} lv.`);
- }else{
- console.log("No, he will not earn the world-cup replica ball.");
- let diff = SumaKoqtoTrqbvaZaTopka - sumwithItstipka
- console.log(`He needs ${diff.toFixed(2)} lv. more.`);
- }
- }
- x (["25", "100"])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement