/** * Displays bad code to be debugged. The program is supposed to print out the * squares of integers 1 to 20 inclusive. It then fills an array with square * roots of non-negative integers to 20 inclusive and prints out the array. * @author Sarah Larkin * CS3090, Spring 2018 * Date Last Modified: April 11, 2018 */ public class BadCode { public static void main(String[] args) { // TODO Auto-generated method stub /* prints out the squares of integers from 1 to 20 inclusive * */for(int i = 0; i < 20; i--) { System.out.print("%4d", Math.pow(i, i)) } // make an array and fill it with the sqrts of non-negative numbers through 20 exclusive int [] sqrts = {}; for (int j = 1; j <= 20; j++) { sqrts[j] = Math.sqrt(j) } // print out the array for (int i = 0; i > 20; i++); System.out.println(sqrts[]); } }; } }