public class FutureTuition {
  public static void main(String[] args) { 
    double tuition = 10000;   // Rok 0.
    int year = 0;
    while (tuition < 20000) {
      tuition = tuition * 1.07;
      year++;
    }
  
    System.out.println("Czesne zostanie podwojone za "
      + year + " lat");
    System.out.printf("Za %1d lat czesne wyniesie %.2f zł",
      tuition, year);
  }
}
