In: Computer Science
Write a program whose inputs are three integers, and whose output is the smallest of the three values
//Smallest3.java
import java.util.Scanner;
public class Smallest3 {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int x,y,z,min;
System.out.print("Enter first number: ");
x = scanner.nextInt();
System.out.print("Enter second number: ");
y = scanner.nextInt();
System.out.print("Enter second number: ");
z = scanner.nextInt();
min = x;
if(min > y)
min = y;
if(min > z)
min = z;
System.out.println("Minimum: "+min);
}
}

