Program to find the Speed of train as per speed of sound | Function to find the Speed of train ; Driver Code ; Calling Function
function speedOfTrain ( X , Y ) { var Speed ; Speed = 1188 * ( ( X - Y ) / Y ) ; return Speed ; } var X = 8 , Y = 7.2 ; var result = ( speedOfTrain ( X , Y ) ) ; document . write ( Math . round ( result ) + " " ) ;