HW5.9-LMLPHP

HW5.9-LMLPHP

 public class Solution
 {
     public static void main(String[] args)
     {
         System.out.printf("%s\t%s\t%s\t%s\n", "Inch", "Meter", "Meter", "Inch");

         for(double i = 1, j = 20; i <= 10 && j <= 65; i++, j += 5)
             System.out.printf("%f\t%f\t%f\t%f\n", i, footToMeter(i), j, meterToFoot(j));
     }

     public static double footToMeter(double foot)
     { return foot / 0.305; }

     public static double meterToFoot(double meter)
     { return meter * 0.305; }
 }
04-23 08:58