Had to cheat to figure out what you were doing. You've got c equal to the speed of light in a vacuum (299792458 m/sec), which is good. However, you're dividing by 336 days per year (60 sec * 60 min * 24 hours * 7 days * 4 weeks * 12 months) instead of either 365 or 365.25 if you want to include leap years.
It's a good problem, but if you're using specific values for a conversion factor that's important to solving the problem, please make sure you spell it out in the problem description.
Find the palindrome
Program an exclusive OR operation with logical operators
Project Euler: Problem 7, Nth prime
Angle between two vectors
count any radix?
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