public class test { public static void main(String[] args) { double meter; double foot; double x = 1; double y = 20; System.out.println("Feet \t Meters \t | \t Meters \t Feet"); while (x <= 10 && y <= 65){ meter = footToMeter(x); foot = meterToFoot(y); System.out.printf("%10.1d \t %10.3d | %10.1d \t %10.3d", x, meter, y, foot); x++; y += 5; }//end of while }//end of main method public static double footToMeter(double foot) { return 0.305 * foot; }//end of footToMeter public static double meterToFoot(double meter) { return 3.279 * meter; }//end of meterToFoot }
it is something inside this part, but i can't figure out what is wrong:
System.out.printf("%10.1d \t %10.3d | %10.1d \t %10.3d", x, meter, y, foot);