all program
all program
Scanner;
public class sara
{
public static void main(String[] args)
{
int ch,x;
Scanner sc = new Scanner(System.in);
System.out.println("1. Positive or Negative");
System.out.println("2. Even or Odd");
System.out.println("3. Exit");
case 1:
if(x>=0)
System.out.println("number is positive");
else
System.out.println("number is negative");
break;
case 2:
if(x%2==0)
System.out.println("number is Even");
else
System.out.println("number is odd");
break;
default: System.out.println("wrong choice");
}
}
}
// Note: This example displays the server's local time, which may differ from your
local time.