int count = 1; int num = 1; while(count < 10){ num = (num + 1) * 2; count++; } System.out.println("num=" + num);