Program to check if tank will overflow , underflow or filled in given time | function to calculate the volume of tank ; function to print overflow / filled / underflow accordingly ; radius of the tank ; height of the tank ; rate of flow of water ; time given ; calculate the required time ; printing the result
function volume ( radius , height ) { return ( ( 22 / 7 ) * radius * radius * height ) ; } function check_and_print ( required_time , given_time ) { if ( required_time < given_time ) document . write ( " " ) ; else if ( required_time > given_time ) document . write ( " " ) ; else document . write ( " " ) ; } let radius = 5 , height = 10 , rate_of_flow = 10 ; let given_time = 70.0 ; let required_time = volume ( radius , height ) / rate_of_flow ; check_and_print ( required_time , given_time ) ;