Speed of Sound
Please don’t give me a life lesson, if you know how to write the code please share! I’m so lost and irritated I just want to see how it’s done correctly and work backwards. Please! Yes I’ve payed very close attention to the previous lessons but I promise if you were starting from nothing like I am it wouldn’t make sense, they made this problem too difficult early on. The speed of sound in air is 343 meters per second. Create a program that takes the seconds as input, calculates and outputs to the console the distance the sound covers in a given number of seconds. Sample Input 3 Sample Output 1029 The total distance that sound covers in 3 seconds is 3*343 = 1029. Use console.log() to perform an output to the console. //not to overwhelm you we’ve hidden the code that executes the input ;) function main() { var seconds = parseInt(readLine(), 10) // Your code here }