Created
May 28, 2018 15:29
-
-
Save UlvacMoscow/4cbe58eb31f759b5f62c6fdaaadf5c98 to your computer and use it in GitHub Desktop.
Syntax created by Ulvac - https://repl.it/@Ulvac/Syntax
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
var nameProduct; | |
var priceProduct; | |
var saleProduct; | |
var totalPriceProduct; | |
var amountProduct; | |
var companyMoney; | |
var surrender; | |
var purchasePriceProduct; | |
var maxBuyProducts; | |
nameProduct = `Телепорт бытовой VZHIH-101`; | |
priceProduct = 10000; | |
saleProduct = 0.1; | |
amountProduct = 2; | |
companyMoney = 52334224; | |
purchasePriceProduct = 6500; | |
console.log(`В наличии имеется: ${nameProduct}`); | |
console.log(`Стоимость товара ${priceProduct} Q`); | |
totalPriceProduct = priceProduct * amountProduct - saleProduct * (priceProduct * amountProduct); | |
console.log(`Цена покупки с учетом скидки составит ${totalPriceProduct}Q`) | |
surrender = companyMoney % purchasePriceProduct; | |
maxBuyProducts = Math.floor(companyMoney / purchasePriceProduct) | |
console.log(`мы можем закупить ${maxBuyProducts} единиц товара, после закупки на счету останется ${surrender} Q`) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment