Pure Programmer
Blue Matrix


Cluster Map

Project: Light-Year Distance

Write a program that computes the distance light can travel in one [[Julian year]]. This is known as a [[light-year]]. Light travels at the speed of 299,792,458 m/s and a Julian year is 365.25 days long.

Output
$ javac -Xlint LightYearDistance.java $ java -ea LightYearDistance Light-Year: 9.4607304725808E15 m

Solution