2-12 Sun Facts

Post date: Jan 18, 2014 6:07:29 PM

//2-12  Sun Facts

package sunfacts;

public class SunFacts {

 

    // This program uses E notation.

    public static void main(String[] args) {

        // TODO code application logic here

        double distance, mass;

        distance =1.495979E11;

        mass=1.989E30;

        System.out.println("The sun i s " +distance +

        " meters away.");

        System.out.println("The sun's mass is " +mass +

        " kilograms.");

    }

}