+ 3
First code in JS. What is the code to get an output in console.log()?
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.
2 Réponses
+ 6
https://code.sololearn.com/WSBQE9sn9UKw/?ref=app
you can check above code with UI or in javascript you can use
var sec=prompt("enter the number");
var distance=sec*343;
console.log(distance);
+ 2
Thank you very much!