Advertisement
teofarov13

Untitled

Oct 5th, 2021
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function aquarium(input) {
  2.     let length = Number(input[0]);
  3.     let width = Number(input[1]);
  4.     let heigth = Number(input[2]);
  5.     let percentage = Number(input[3]) / 100;
  6.     let volumeOfAquarium = length * width * heigth
  7.     let volumeInLitres = volumeOfAquarium * 0.001
  8.     let totalLitres = volumeInLitres * (1 - percentage);
  9.  
  10.     console.log(totalLitres)
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement