You are on page 1of 1

class votertest

{
public static void main(string[]args)
{
final int voting_age=19 ;
int age ;
boolean eligible ;
age = in.getint () ;
if (age>=voting_age)eligible = true ;
else eligible = false ;
if (eligible)
system.out.println("eligible to vote");
else
system.out.println("not eligible to vote");
}
}

You might also like