Q:

Jave while loops

Beginner at Java. Using Zybooks. To me the software does not teach well, its vague. 
Here is the Question:
Given positive integer numInsects, write a while loop that prints that number doubled without reaching 200. Follow each number with a space. After the loop, print a newline. Ex: If numInsects = 16, print:
16 32 64 128 
Here is what I have:
import java.util.Scanner;

public class InsectGrowth {
   public static void main (String [] args) {
      int numInsects;
      Scanner scnr = new Scanner(System.in);
      numInsects = scnr.nextInt(); // Must be >= 1

       System.out.print(numInsects + " ");

  while (numInsects <= 100) {
     numInsects = numInsects * 2;
     System.out.print(numInsects + " ");
  }

  System.out.println();

   }
}

Here are the results: It did not pass with 200, just left an empty space.
Testing with 16.
Your output
16 32 64 128 
Testing with 98.
Your output
98 196 
Testing with 200.
Output differs. See highlights below.
Your output
200 
Expected output

A:

Move your first print into the while loop and check for 200
public class InsectGrowth {
   public static void main (String [] args) {
      int numInsects;
      Scanner scnr = new Scanner(System.in);
      numInsects = scnr.nextInt(); // Must be >= 1

      while (numInsects < 200) {
          System.out.print(numInsects + " ");
         numInsects = numInsects * 2;
      }

      System.out.println();

   }
}

