import java.lang.Math.*; public class Logic { public static void main(String[] args){ System.out.println("***** FIRST LOGIC ERROR ******\n"); double balance = 1000; // Savings account balance double rate = 7.0; // Annual interest rate for (int k = 0; k < 12; k++) balance = balance * (1 + rate/12); System.out.println("John just put $1000 into his savings account.\n" + "The interest rate is 7% per year, compounded monthly.\n" + "After 1 year, John's balance is: $" + balance); System.out.println("***** NEXT LOGIC ERROR ******\n"); double area = -15; double radius = Math.sqrt(area/Math.PI); System.out.println("The radius of a circle with area 15 square cm is " + radius + " cm"); } }