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
Post a Comment