The document is a Java program that takes a random number as input from the user. It then checks if the number is negative, positive, or zero. For negative numbers, it calculates and prints the absolute value owed to break even. For positive numbers, it prints the amount above zero. And for zero, it simply prints that the number is at the zero mark.
The document is a Java program that takes a random number as input from the user. It then checks if the number is negative, positive, or zero. For negative numbers, it calculates and prints the absolute value owed to break even. For positive numbers, it prints the amount above zero. And for zero, it simply prints that the number is at the zero mark.
The document is a Java program that takes a random number as input from the user. It then checks if the number is negative, positive, or zero. For negative numbers, it calculates and prints the absolute value owed to break even. For positive numbers, it prints the amount above zero. And for zero, it simply prints that the number is at the zero mark.
int nums = user_input.nextInt(); if (nums < 0) { System.out.println("You entered a negative number."); int ow = Math.abs(nums); System.out.println("You owe " + ow + " inorder to break even."); System.out.println("You have some work to do."); } else { int ex = nums - 0; if (ex > 0) { System.out.println("You are " + ex + " above the zero mark."); System.out.println("You owe " + ex + " above the zero mark, which is impressive."); } else if(ex == 0) { System.out.println("You are only at the zero mark."); user_input.close(); } } } }