println("counting up with a while loop"); int MIN = 0; // constant declaration used to terminate the loop int i = 12; // initialization of counter variable // i is the loop variable, incremented each time through the loop while (i >= MIN) { // continutation test: boolean expression // tested before continuing next iteration // print the counter followed by a space (no new line) print(i + " "); //counter i is updated i = i-1; } // change line with println println(""); println("done: out of the while loop"); println("---------------------------"); println("counting up with a for loop"); //Notice that the data type int is not in front of the variable i here //because i was declared above for(i=12; i>=MIN; i=i-1) { print(i + " "); } println(""); println("done: out of the for loop");