function whenitDouble(interestRate){
let year = 0;
let principal = 1; //원금
let interest = 1+interestRate/100; //이자(복리 계산법)
//원금이 2 이상이 될때까지 while문을 돌리고 2 이상이 되면 빠져나와 year를 리턴한다.
while(principal<2){
principal = principal * interest;
year++;
}
return year;
}