double tuition = 10000; for (int year = 1; tuition<20000; year++) { tuition = (0.07*tuition); } System.out.println("Tuition will be doubled in " + year + " years.");