Write the Java program for the following
Input your age and check whether you are eligible to note or not.
Answers
Answered by
1
Answer:
import java.until.scanner
package election
Class age{
public static void main(String arcs[]){
Scanner scan=new Scanner (System.in);
System.out.println(“Enter the age of person”);
into user_age=scan.nextInt();
System.out.println(“The age of person is”+user_age);
if(user_age>18)
{
System.out.println(“You are eligible to Vote”);
}
else{
System.out.println(“You are not eligible to vote”);
}
}
}
Similar questions