计算一光年的距离 public class LightYear { public static void main(String[] args) { int speed = 300000; long seconds = 365 * 24 * 60 * 60; long distance = speed * seconds; System.out.println(“一光年的距离是”+distance+“千米。”); } } 相关文章: