标签:style blog color java io ar div log
import javax.swing.JOptionPane; public class Foot { public static void main(String[] srgs){ String input = JOptionPane.showInputDialog(null,"请输入米数:","输入框",JOptionPane.QUESTION_MESSAGE); double feet = Double.parseDouble(input); System.out.println(feet + " feet is " + feet * 0.305 +" meters "); } }
编写程序,读入英尺数,将其转换为米数并显示结果。一英尺等于0.305米。
标签:style blog color java io ar div log
原文地址:http://www.cnblogs.com/Amoxicil/p/3894596.html