public class Interest1
{
  public static void main(String args[])
  {
    double rate, prin;
    int month;

    rate = IOStuff.getDoublePrompt("Enter yearly interest rate as a per-cent:");
    rate = rate / 1200.0; //convert to monthly interest as a fraction
    prin = 1.00;
    month = 0;
    while(prin < 2.00)
    {
      month++;
      prin = prin + rate*prin;
      System.out.println("After " + month + " month(s), the account contains " + prin);
    }
  }
}    

