class NumberInWordDemo
{
public static void main(String args[])
{
int x = 3;
if(x < 0)
System.out.println("x is a negative number having value " + x);
else if(x == 0)
System.out.println("x is a zero number having value " + x);
else if(x == 1)
System.out.println("x is a positive number having value One");
else if(x == 2)
System.out.println("x is a positive number having value Two");
else if(x == 3)
System.out.println("x is a positive number having value Three");
}
}
Output
x is a positive number having value Three