popovIliya

March-2022-FirstStepsInCoding-Exercise-Soft Uni - Fish Tank

Mar 5th, 2022 (edited)
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function litersOfWater(input){
  2. let length = parseInt(input[0]);
  3. let width = parseInt(input[1]);
  4. let height = parseInt(input[2]);
  5. let percent = Number(input[3]);
  6. let volume = length * width * height;
  7. let liters = volume * 0.001;
  8. let sum = liters * (1 - (percent / 100));
  9. console.log(sum);
  10. }
Add Comment
Please, Sign In to add comment