(以英里计的平均速度)假设一个跑步者45分钟30秒内跑了14公里。编写一个程序显示以每小时多少英里为单位的平均速度值。(注意,1英里等于1.6公里。)
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package dome1_10;
/**
*
* @author Administrator
*/
public class Dome1_10 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
double runningsecond = 45 * 60 + 30;
double runninghour = runningsecond / (60 * 60);
System.out.println(14 / runninghour / 1.6);
}
}