Computer Science, asked by Chattyyrr, 9 months ago

Write a program in Java (using Bufferedreader) to find out whether a person is eligible to vote or not. ​

Answers

Answered by sudharsansundar898
3

Answer:

import java.io.*;

import java.util.*;

class voteCheck

{

public static void main(String args[])

{

Scanner sc=new Scanner(System.in);

System.out.println("Enter the age:");

int age=sc.nextInt();

if(age>=18)

System.out.println("You are eligible for voting");

else

System.out.println("You are not eligible for voting");

}

}

Similar questions