Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function christmasPreparation(arg1, arg2, arg3, arg4) {
- let rollsOfPaper = Number(arg1);
- let rollsOfCloth = Number(arg2);
- let littersOfGlue = Number(arg3);
- let percent = Number(arg4);
- let paperPrice = rollsOfPaper * 5.80;
- let clothPrice = rollsOfCloth * 7.20;
- let gluePrice = littersOfGlue * 1.20;
- totalSum = paperPrice + clothPrice + gluePrice;
- sum = totalSum - (percent / 100) * totalSum;
- console.log(sum.toFixed(3));
- }
- christmasPreparation(2, 3, 2.5, 25);
- function easterLunch(arg1, arg2, arg3) {
- let cakesCount = Number(arg1);
- let eggsCount = Number(arg2);
- let cookies = Number(arg3);
- let cakesPrice = cakesCount * 3.20;
- let eggsPrice = eggsCount * 4.35;
- let cookiesPrice = cookies * 5.40;
- let eggPaintPrice = eggsCount * 12 * 0.15;
- let totalCost = cakesPrice + eggsPrice + cookiesPrice + eggPaintPrice;
- console.log(totalCost.toFixed(2));
- }
- easterLunch(3, 2, 3);
- function calculatorDepoziti(arg1, arg2, arg3) {
- let depositedAmount = Number(arg1);
- let termOfTheDeposit = Number(arg2);
- let annualInterestRate = Number(arg3);
- let interest = depositedAmount * (annualInterestRate / 100);
- let monthlyInterest = interest / 12;
- let totalSum = depositedAmount + termOfTheDeposit * monthlyInterest;
- console.log(totalSum.toFixed(2));
- }
- calculatorDepoziti("200",
- "3",
- "5.7");
- function company(arg1, arg2, arg3, arg4, arg5) {
- let daysCount = Number(arg1);
- let confectionersCount = Number(arg2);
- let cakesCount = Number(arg3);
- let wafflesCount = Number(arg4);
- let pancakesCount = Number(arg5);
- let cakes = cakesCount * 45;
- let waffles = wafflesCount * 5.8;
- let pancakes = pancakesCount * 3.2;
- let sumForDay = (pancakes + waffles + cakes) * confectionersCount;
- let totalMoney = sumForDay * daysCount;
- let money = totalMoney - (1 * totalMoney) / 8;
- console.log(money);
- }
- company("23",
- "8",
- "14",
- "30",
- "16");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement