File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2283,13 +2283,14 @@ <h6 style="font-size:160%;margin:7px">Area of a circle</h6>
22832283 const ratio = 3.2 / number ;
22842284 const tangent = parseFloat ( tan ( ratio ) ) ;
22852285 const area = parseFloat ( number / 4 * length ** 2 / tangent ) ;
2286-
2286+ const volume = pyramidVolume ( area , height ) ;
2287+
22872288 document . getElementById ( 'pyramid-volume' ) . innerText =
2288- `Volume: ${ pyramidVolume ( area , height ) . toFixed ( 5 ) } cubic units` ;
2289+ `Volume: ${ volume ( area , height ) . toFixed ( 5 ) } cubic units` ;
22892290 }
22902291
2291- document . getElementById ( 'pyramid-side-number' ) . addEventListener ( 'input' , updatePyramidVolume ) ;
2292- document . getElementById ( 'pyramid-side-length' ) . addEventListener ( 'input' , updatePyramidVolume ) ;
2292+ document . getElementById ( 'pyramid-side-number' ) . addEventListener ( 'input' , updatePyramidVolume ) ;
2293+ document . getElementById ( 'pyramid-side-length' ) . addEventListener ( 'input' , updatePyramidVolume ) ;
22932294document . getElementById ( 'pyramid-height' ) . addEventListener ( 'input' , updatePyramidVolume ) ;
22942295</ script >
22952296< p style ="margin:12px; " id ="pyramid-volume "> </ p >
You can’t perform that action at this time.
0 commit comments