实现英尺英寸的身高转换成厘米身高
例如5尺7寸=170CM
计算公式:(英尺+(英寸/12))*0.3048
package hello;
import java.util.Scanner;
public class Inch {
public static void main(String[] args) {
// TODO Auto-generated method stub
double foot =0;
double inch =0;
double shengao;
Scanner in = new Scanner(System.in);
foot= in.nextInt();
inch= in.nextInt();
shengao=((foot+(inch/12))*0.3048);
System.out.print(shengao);
}
}