I dont know how to write this code I am new to Java and one of the labs is: write a counter-controlled while loop that uses the loop control variable to take on the values 0 through 10 Remember to initialize the loop control variable before the program enters the loop. Here is the half written program that they give you. and you are suppose to write the while part. i just cant figure out how to do it.? Can someone show me how this is done? I would really apprectiate it.
// DoubleQuadruple.java - This program prints the numbers 0 through 10 along // with these values doubled and quadrupled. // Input: None. // Output: Prints the numbers 0 through 10 along with their doubles and quadruples. public class DoubleQuadruple { public static void main(String args[]) { String head1 = "Number: "; String head2 = "Doubled: "; String head3 = "Quadrupled: "; int numberCounter; // Numbers 0 through 10. int doubled; // Stores the double of a number. int quadrupled; // Stores the quadruple of a number. final int NUM_LOOPS = 10; // Constant used to control loop. // This is the work done in the housekeeping() method System.out.println("0 through 10 doubled and quadrupled" + "\n"); // This is the work done in the detailLoop() method // Initialize loop control variable. // Write your counter_controlled while loop here. // Calculate double. // Calculate quadruple. System.out.println(head1 + numberCounter); System.out.println(head2 + doubled); System.out.println(head3 + quadrupled); // Next number. // This is the work done in the endOfJob() method System.exit(0); } // End of main() method. } // End of DoubleQuadruple class.