import java.util.Scanner;
public class SmallestOfThreeNumbersUsingTernary {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
// Read three numbers from the user
System.out.print("Enter the first number: ");
int num1 = sc.nextInt();
System.out.print("Enter the second number: ");
int num2 = sc.nextInt();
System.out.print("Enter the third number: ");
int num3 = sc.nextInt();
// Find the smallest of the three numbers using the ternary operator
int smallest = num1 < num2 ? (num1 < num3 ? num1 : num3) : (num2 < num3 ? num2 : num3);
// Print the smallest number
System.out.println("The smallest of the three numbers is " + smallest);
}
}