write a jave program input the name and age if age is more than 18 print eligible to vote if age is less than 18 print not eligible to vote
Answers
Answered by
1
Answer:
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:
the following words from the missing number is neither prime numbers ?
Similar questions
Accountancy,
3 days ago
Math,
3 days ago
Physics,
3 days ago
Science,
7 days ago
Hindi,
7 days ago
Computer Science,
8 months ago
English,
8 months ago