// A simple program built to handle assertions import java.util.*; public class Assertions { public static void main(String[] args) { System.out.print("Give me a number: "); Scanner s = new Scanner(System.in); int n = s.nextInt(); int p = 0; // A: n > 1? SOMETIMES; p > 0? NEVER while (n > 1) { // B: n > 1? ALWAYS; p > 0? SOMETIMES if (n % 2 == 0) { // C: n % 2 == 0? ALWAYS n = n / 2; } else { // D: n % 2 == 0? NEVER n = 3 * n + 1; } p++; } // E: n > 1? NEVER System.out.println("n = " + n); System.out.println("p = " + p); } }