OneCompiler

Find whether a person is eligible to vote or not ?

1714

import java.io.;
import java.util.
;

public class Solution
{
public static void main(String[] args)
{
Scanner s=new Scanner(System.in);
int n=s.nextInt();
if(n>=18)
System.out.print("Eligible for voting");
else
System.out.print("Not eligible for voting");
}
}