- 2

The speed of sound in air is 343 meters per second. Create a program that takes the seconds as input, calculates and outputs to

How to do it

29th Oct 2020, 4:05 PM
Vishal
Vishal - avatar
28 Answers
+ 4
29th Oct 2020, 4:42 PM
Avinesh
Avinesh - avatar
+ 4
I wouldnt sweat the xp honestly nobody seems to know the answer and maybe we have to finish the course to finish it which is pointless in learning along the lesson but its whatever.
21st Nov 2020, 8:56 PM
Emmanuel Riano
Emmanuel Riano - avatar
+ 4
speed = 343 time = 600 console.log(speed*time)
12th Mar 2021, 9:56 AM
Louba
Louba - avatar
+ 3
Your question is incomplete, make sure to put the actual question in the description and not in the heading.
29th Oct 2020, 4:17 PM
Avinesh
Avinesh - avatar
+ 3
im so lost on this, seriously about to cancel and give up, they did not teach enough prior to giving us this problem
21st Nov 2020, 7:44 PM
Andrew Medrano
Andrew Medrano - avatar
+ 1
I do not know what's the problem with you. In sololearn you cannot write JS code separately, it comes inside web as a whole package. The above code works just fine. Just enter the number of seconds.
29th Oct 2020, 4:51 PM
Avinesh
Avinesh - avatar
+ 1
I did not know you are asking for a code coach problem. I'm not sure but for the given statement, this should work. var seconds = parseInt(prompt()); var soundSpeed = 343; console.log(seconds*soundSpeed)
29th Oct 2020, 4:56 PM
Avinesh
Avinesh - avatar
+ 1
This one line should work. console.log(343*seconds);
29th Oct 2020, 5:05 PM
Avinesh
Avinesh - avatar
+ 1
Im stuck on the same question and cant seem to change the output for each test case. It says not to overwelm you we've hidden the code that executes the output as a comment. Ill post my code so you know my efforts. function main() { var x = 343; var y = 1; var z = 3; var w = 4; var a = eval("x * z"); var b = eval("x * y"); var c = eval("x * w"); console.log(a); } function parseInt(){ var x = 343; var y = 1; var z = 3; var w = 4; var a = eval("x * z"); var b = eval("x * y"); var c = eval("x * w"); console.log(b);} function main() { var x = 343; var y = 1; var z = 3; var w = 4; var a = eval("x * z"); var b = eval("x * y"); var c = eval("x * w"); console.log(c);}
21st Nov 2020, 3:16 AM
Emmanuel Riano
Emmanuel Riano - avatar
+ 1
function speed(){ let x = 343; let z = 600; console.log( x * z) } speed()
14th Sep 2021, 8:18 PM
sobhan jaefari
sobhan jaefari - avatar
0
I meant to say the first question in JavaScript after completing basics named as MATH OPERATOR 1 Help me to Get of this
29th Oct 2020, 4:21 PM
Vishal
Vishal - avatar
0
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.
29th Oct 2020, 4:23 PM
Vishal
Vishal - avatar
0
Have you got the answer
29th Oct 2020, 4:30 PM
Vishal
Vishal - avatar
0
JavaScript man
29th Oct 2020, 4:37 PM
Vishal
Vishal - avatar
0
I have tried it. the link above you mentioned not working It has to be solved in JavaScript only And the above one had html,css, JavaScript
29th Oct 2020, 4:44 PM
Vishal
Vishal - avatar
0
I have tried it it's not working
29th Oct 2020, 4:52 PM
Vishal
Vishal - avatar
0
In the result section it's showing Test case#1 is right And the below ones are wrong Test case#2 Test case#3 Test case#4
29th Oct 2020, 4:54 PM
Vishal
Vishal - avatar
0
The above one also not working
29th Oct 2020, 5:01 PM
Vishal
Vishal - avatar
0
Have you done coach problem
29th Oct 2020, 5:02 PM
Vishal
Vishal - avatar
0
Tried even before i had dropped question into this q&A
29th Oct 2020, 5:06 PM
Vishal
Vishal - avatar