//Q 3 Write a Java program that reads a number and prints "zero" if the number is zero. Otherwise,
//print "positive" or "negative". And if the number is greater than 100 print the number is to large positive
System.out.println("Enter a number");
Scanner input =new Scanner(System.in);
int num=input.nextInt();
if (num<1)
{
System.out.println("The Number is Too Small");
}
else if(num>100)
{
System.out.println("The Number is Too large positive ");
}
else
{
System.out.println("The Number is positive");
}
}
}
Comments
Post a Comment