Computer Science, asked by kairakumar14, 7 days ago

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 saminaseer050
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 DHRUBHIA007
0

Explanation:

the following words from the missing number is neither prime numbers ?

Similar questions