Advertisement
Btwonu

Untitled

Feb 8th, 2020
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. //Architect
  2. function solve(input) {
  3. let name = input.shift();
  4. let projectCount = Number(input.shift());
  5. let hoursNeeded = projectCount * 3;
  6. console.log(`The architect ${name} will need ${hoursNeeded} hours to complete ${projectCount} project/s.`);
  7. }
  8.  
  9. //Petshop
  10. function petshopExpenses(input) {
  11. let ourDogsExs = parseFloat(input.shift() * 2.50)
  12. let neighboursDogsExs = parseFloat(input.shift() * 4.00);
  13. let expenses = (ourDogsExs + neighboursDogsExs).toFixed(2);
  14. console.log(`${expenses} lv.`);
  15. }
  16. petshopExpenses( [
  17. '13',
  18. '9',
  19. ] )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement