Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function demo(input) {
- let depositSum = Number(input[0]);
- let depositPeriod = Number(input[1]);
- let percent = Number(input[2]);
- let result = depositSum + depositPeriod * ((depositSum * percent / 100) / 12);
- console.log(result);
- }
- demo(["200", "3", "5.7"]);
- function books(input) {
- let pagesCount = Number(input[0]);
- let pages = Number(input[1]);
- let daysCount = Number(input[2]);
- let totalTime = pagesCount / pages;
- let hoursForDay = totalTime / daysCount;
- console.log(hoursForDay);
- }
- books(["212", "20", "2"]);
- function birthday(input) {
- let rent = Number(input[0]);
- let cakePrice = rent * 0.2;
- let drinksPrice = cakePrice - (cakePrice * 0.45);
- let animatorPrice = rent / 3;
- let sum = rent + cakePrice + drinksPrice + animatorPrice;
- console.log(sum);
- }
- birthday(["2250"]);
- function charityCampany(input) {
- let daysCount = Number(input[0]);
- let confectionersCount = Number(input[1]);
- let cakeCount = Number(input[2]);
- let wafflesCount = Number(input[3]);
- let pancakesCount = Number(input[4]);
- let cakePrice = cakeCount * 45;
- let wafflesPrice = wafflesCount * 5.80;
- let pancakesPrice = pancakesCount * 3.2;
- let sumForDay = (cakePrice + wafflesPrice + pancakesPrice) * confectionersCount;
- let totalSum = sumForDay * daysCount;
- let sum = totalSum - (totalSum / 8);
- console.log(sum);
- }
- charityCampany(["23", "8", "14", "30", "16"]);
- function fruitMarket(input) {
- let strawberriesPrice = Number(input[0]);
- let bananasCountKg = Number(input[1]);
- let orangesCountKg = Number(input[2]);
- let raspberriesCountKg = Number(input[3]);
- let strawberriesCountKg = Number(input[4]);
- let raspberriesPriceKg = strawberriesPrice / 2;
- let orangesPriceKg = raspberriesPriceKg - (raspberriesPriceKg * 0.4);
- let bananasPriceKg = raspberriesPriceKg - (raspberriesPriceKg * 0.8);
- let raspberriesSum = raspberriesCountKg * raspberriesPriceKg;
- let orangesSum = orangesCountKg * orangesPriceKg;
- let bananasSum = bananasCountKg * bananasPriceKg;
- let strawberriesSum = strawberriesCountKg * strawberriesPrice;
- let totalSum = raspberriesSum + orangesSum + bananasSum + strawberriesSum;
- console.log(totalSum);
- }
- fruitMarket(["48", "10", "3.3", "6.5", "1.7"]);
- function aquarium(input) {
- let length = Number(input[0]);
- let width = Number(input[1]);
- let height = Number(input[2]);
- let percent = Number(input[3]);
- let aquariumVolume = length * width * height;
- let totalLitres = aquariumVolume * 0.001;
- let totalPercent = percent * 0.01;
- let litres = totalLitres * (1 - totalPercent)
- console.log(litres);
- }
- aquarium(["85", "75", "47", "17"]);
- function convector(input) {
- let usd = Number(input[0]);
- let bgn = usd * 1.79549;
- console.log(bgn);
- }
- convector([22]);
- function convectorRadiansInDegrees(input) {
- let radians = Number(input[0]);
- let degrees = radians * 180 / (Math.PI);
- console.log(degrees.toFixed(0));
- }
- convectorRadiansInDegrees(["3.1416"]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement