inch和meter之间的转换问题

import javax.swing.JOptionPane;
public class inchToMeter {
    public static void main(String[] args){
        final double PARAMETER = 0.305;
        String input = JOptionPane.showInputDialog(null,"plz input inchs:",
                "input dialog Demo",JOptionPane.QUESTION_MESSAGE);
        double inch = Double.parseDouble(input);
        
        JOptionPane.showMessageDialog(null, "the Meter is: " + inch*PARAMETER);
    }
}

 

posted @ 2014-08-03 12:00  Amoxicil  阅读(561)  评论(0编辑  收藏  举报