wtite a program is a person elligble for vote or not java program

wap a person is eligible for vote or not
import java.util.Scanner;
class vote
{
public static void main(String[] arg)
{
Scanner sc=new Scanner(System.in);
System.out.println("Enter the age of person: ");
int age=sc.nextInt();
if(age>18)
{
System.out.println("the person is elligble for vote");
}
else
{
System.out.println("PERSON IS NOT ELLIGBLE FOR VOTE");
}
}
}

Comments

Popular posts from this blog

A story of friendship A tiger and a rat......become a revengable....

best pen drive

wap to perform subtraction