public class Organ { public static void main(String[] args) { // Set of organ pipes spanning one octave final double factor = Math.pow(2, 1.0/12.0); // twelfth root of 2 double length = 100; for (int i = 0; i <= 12; ++i) { System.out.println(i + "\t" + length); length = length * factor; // length *= factor; } System.out.println(); System.out.println("factor == " + factor); } }