We know the time(seconds) taken by light to reach surface of earth. What if the distance varies yearly or source of light moves from one planet to another? How the time(seconds) varies?
Hello, Durga Sadasivuni. Please explain clearly in the Problem Statement what the input (x) represents, and what the output (y) represents. For extra assistance in understanding the problem, you can also provide an example in the Problem Statement. —DIV
Two more issues: (1) You need to decide what value you would like people to use for the speed of light. Depending on the value, you may get non-integer results in the correct output, as per Solution 1559564. If you don't want people to use the exact value, then you must say so [if there is no instruction about the value, then use of the exact value would be implied]. (2) You need to decide what precision you would like the output to be provided in; currently there seem to be rounding errors in your last two test cases [if I understand the problem & your assumptions correctly], as per Solution 1559559. —DIV
Reverse the elements of an array
Determine the number of odd integers in a vector
Create an index-powered vector
02 - Vector Variables 5
modulus of a number
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office