// CS 101 Lab // Debugging exercise public class Debug { public static void main (String args[]) { if (args.length != 2) { System.out.println("Please provide two integer arguments"); return; } int a = Integer.parseInt(args[0]); int b = Integer.parseInt(args[1]); int c = 1; int d = 0; while (b > 0) { if (b % 2 == 0) { a = a * a; b = b / 2; } else { c = c * a; b = b - 1; } d++; // set breakpoint on this line } System.out.println("Answer = " + c + " in " + d + " steps."); } }