Computer Science, asked by bellaketia94, 2 months ago

java program to allow the user to input his age then the program will show if the person is eligible to vote. A person who is eligible to vote must be older than or equal to 18 years old

Answers

Answered by nidalismailn
0

Answer:

18 Or above

Explanation:

That means If the person is 18 Then also he can vote and if he is about 18 like 19 or 20 then also he can vote

Answered by SR5798
1

Answer:

import java.io.*;

import java.util.*;

class VoteEligibility

{

   public static Scanner sc=new Scanner(System.in);

   public static void main(String args[])

   {

       int age;

       System.out.println("Enter your age");

       age=sc.nextInt();

       if (age>=18)

       System.out.println("Eligible to vote");

       else

       System.out.println("Ineligible to vote");

   }

}

Explanation:

Similar questions