write a program to find out the person is eligivle to vote or not.
Answers
Answered by
1
Answer:
A person can votes if age is greater than or equal to 18.
import java.util.Scanner;
public class VotingAge
{
public static void main(String[] args)
{
int age;
Scanner sc = new Scanner(System.in);
System.out.print("Enter your age=");
age = sc.nextInt();
if (age >= 18)
{
System.out.println("You are eligible for vote.");
}
else
{
System.out.println("You are not eligible for vote.");
}
}
}
Answered by
0
Explanation:
hope it helps you
it is given in my book
Attachments:
![](https://hi-static.z-dn.net/files/d55/728586a07768b5ad541933dd931d7b5d.jpg)
Similar questions
Computer Science,
3 months ago
Physics,
3 months ago
India Languages,
6 months ago
English,
1 year ago
Math,
1 year ago
English,
1 year ago