//WAJP to check the person is Eligible to Vote or not.
import java.util.*;
class EligibilityToVote
{
public static void main()
{
int a;
Scanner sc=new Scanner(System.in);
System.out.print("Enter your age ");
a=sc.nextInt();
if(a>=18)
{
System.out.println("You are Eligible to Vote ");
}
else
{
System.out.println("You are not Eligible to Vote ");
}
}
}
//WAJP to check the student is Pass or Fail.
import java.util.*;
class PassOrFail
{
public static void main()
{
int m;
Scanner sc=new Scanner(System.in);
System.out.print("Enter your Marks: ");
m=sc.nextInt();
if(m>=40)
{
System.out.println("Pass");
}
else
{
System.out.println("Fail");
}
}
}
//WAJP to check the number is Positive or Negative
import java.util.*;
class PositiveOrNegative
{
public static void main()
{
int n;
Scanner sc=new Scanner(System.in);
System.out.print("Enter any Number ");
n=sc.nextInt();
if(n>0)
{
System.out.println("The Number is Positive");
}
else
{
System.out.println("The Number is Negative");
}
}
}
// WAJP to check the number is Even or Odd.
import java.util.*;
class EvenOdd
{
public static void main()
{
int n;
Scanner sc=new Scanner(System.in);
System.out.print("Enter any Number ");
n=sc.nextInt();
if(n%2==0)
{
System.out.println("The Number is Even");
}
else
{
System.out.println("The Number is Odd");
}
}
}
//WAJP to check the number is Greater than 10 or not.
import java.util.*;
class GreaterThan10
{
public static void main()
{
int n;
Scanner sc=new Scanner(System.in);
System.out.print("Enter any Number ");
n=sc.nextInt();
if(n>10)
{
System.out.println("The Number is Greater than 10");
}
else
{
System.out.println("The Number is not Greater than 10");
}
}
}
//WAJP to compare two numbers and print First Number is Greater or Second Number is Greater.
import java.util.*;
class CompareTwoNumbers
{
public static void main()
{
int n1,n2;
Scanner sc=new Scanner(System.in);
System.out.print("Enter First Number: ");
n1=sc.nextInt();
System.out.print("Enter Second Number: ");
n2=sc.nextInt();
if(n1>n2)
{
System.out.println("The First Number is Greater");
}
else
{
System.out.println("The Second Number is Greater");
}
}
}
//WAJP to find the person is in Profit or Loss.
import java.util.*;
class ProfitOrLoss
{
public static void main()
{
int cp,sp;
Scanner sc=new Scanner(System.in);
System.out.print("Enter the Cost Price : ");
cp=sc.nextInt();
System.out.print("Enter the Selling Price : ");
sp=sc.nextInt();
if(sp>cp)
{
System.out.println("The Person is in Profit");
}
else
{
System.out.println("The Person is in Loss");
}
}
}