Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function smartLili(arg1, arg2, arg3) {
- let age = Number(arg1);
- let priceWashmashine = Number(arg2);
- let priceToy = Number(arg3);
- let money = 0;
- let totalPrice = ((money + priceWashmashine) - priceToy - 1) * age;
- for (i = 1; i <= age; i++) {
- for (j = 0; j <= age; j = 2) {
- }
- if (money >= totalPrice) {
- console.log(`Yes! ${(money - totalPrice).toFixed(2)}`);
- } else {
- console.log(`No! ${(totalPrice - money).toFixed(2)}`);
- }
- }
- }
- smartLili("10", "170", "6");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement