import java.io.*; import java.util.Scanner; public class Min { public static void main(String[] args) throws IOException { Scanner scan = new Scanner(System.in); int num1, num2, num3, min; // ask the user for 3 integers System.out.print("Enter three integers: "); // parse the user input num1 = scan.nextInt(); num2 = scan.nextInt(); num3 = scan.nextInt(); // find the minimum if (num1 < num2) { // num1 < num2 if (num1 < num3) { // num1 < num2 AND num1 < num3 min = num1; } else { // num1 < num2 AND num1 >= num3 min = num3; } } else { min = 0; // This is NOT RIGHT! } // output the result to the user System.out.println("The minimum of " + num1 + ", " + num2 + ", and " + num3 + " is " + min); } }