Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function trapezoid(input) {
- let b1 = parseFloat(input[0]);
- let b2 = parseFloat(input[1]);
- let h = parseFloat(input[2]);
- let result = (b1 + b2) * h / 2;
- console.log(`${result.toFixed(2)}`)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement