public class PowersOfTwo { public static void main (String args []) { int i = 0, result = 1; while (i <= 16) { System.out.println("2 raised to the " + i + " is " + result); result = result * 2; i = i + 1; } } }