Advertisement
Spocoman

Programming Book

Feb 27th, 2022
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function programmingBook(input) {
  2.     let bookPrice = (Number(input[0]) * 899) + (2 * Number(input[1]));
  3.     let paperPercent = bookPrice / 100 * Number(input[2]);
  4.     bookPrice += Number(input[3]) - paperPercent;
  5.     console.log(`Avtonom should pay ${(bookPrice - bookPrice / 100 * Number(input[4])).toFixed(2)} BGN.`);
  6. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement