computer class 9 java
Attachments:
Anonymous:
as of class 9th i havent used any class(buffered reader,datainputstream etc)
Answers
Answered by
0
class agecheck
{
public static void main(age)
{
if(age>=18)
{
System.out.println("ELIGIBLE FOR VOTING");
}
else
{
System.out.println("NOT ELIGIBLE FOR VOTING");
}
}
}
Answered by
0
import java.util.*;
public class vote
{
public static void main(String args[])
{
Scanner in=new Scanner(System.in);
int a;
System.out.println("enter the age of the person");
n=in.nextInt();
if(n>=18)
System.out.println("This person is eligible to vote");
else
System.out.println("This person cannot vote");
}
}
hope this helped you
pls mark my answer as brainliest
public class vote
{
public static void main(String args[])
{
Scanner in=new Scanner(System.in);
int a;
System.out.println("enter the age of the person");
n=in.nextInt();
if(n>=18)
System.out.println("This person is eligible to vote");
else
System.out.println("This person cannot vote");
}
}
hope this helped you
pls mark my answer as brainliest
Similar questions