Java program to find minimum between two numbers using if.
/**
* Java program to find minimum between two numbers using if.
*/
import java.util.Scanner;
class Smalltoftwono
{
public static void main(String[] args)
{
int x,y;
Scanner p=new Scanner(System.in);
System.out.println("Enter x value:");
x=p.nextInt();
System.out.println("Enter y value:");
y=p.nextInt();
if( x < y )
{
System.out.println(x+" is small");
}
else
{
System.out.println(x+" is small");
}
}
}