Saturday, October 29, 2011

Java: lightspeed



class lightspeed
{
public static void main(String[] args)
{
   int lightspeed;
long days;
long seconds;
long distance;

lightspeed = 186000;
days = 99;
seconds = days * 24 * 60 * 60;
distance = lightspeed * seconds;

System.out.println("In" + days);
        System.out.println("days light will travel about");
        System.out.println(distance + "miles.");
}
}

1 comment:

Anonymous said...

Nice information at least I think so. Thnx for posting that data.

Tim Octocus
gps jammer for sale