Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function GodzillaKong (input) {
- let budget = input [0];
- let statists = Number (input [1]);
- let cloth = Number (input [2]);
- let decoration = (budget * 0.1);
- let charge = statists * cloth;
- if (statists >=150) {
- charge = charge * 0.9;
- }
- let total = charge + decoration;
- if (total <= budget) {
- let nedostig = budget - total
- console.log (`Action! Wingard starts filming with ${nedostig.toFixed(2)} leva left.`)
- }
- if (total > budget) {
- let poveche = total - budget
- console.log (`Not enough money! Wingard needs ${poveche.toFixed(2)} leva more.`)
- }
- }
- GodzillaKong (["9587.88",
- "222",
- "55.68"])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement