1. Answer the following about the loop below without compiling and running it:
int d = 9;
while (d <= 60) {
System.out.printf("%d, ", d);
d += 9;
}
a. What does the loop print? (Hint: it's all on one line)
b. Rewrite the loop as a for loop instead of a while loop.
2. Write a for loop to print the numbers from 800 down to 6 that are multiples of 6, one number per line.
3. A number is a factor of another number if it evenly divides that number. For example, 3 is a factor of 12 because 12 % 3 is 0. Finish the method below to return the largest factor of n that is smaller than k. (Hint: do not print anything. Find the factor using a loop, and then return it. You may assume that k > 1.)
public static int smallestFactor(int n, int k)