Computer Science, asked by sweetishu2009, 19 days ago

Write a program to accept the age of the user and check for the following criteria: i. If the age of the user is greater than or equal to 65, then print the following statement (Congratulations! You are eligible to avail the facilities of a Senior Citizen.) .ii. If the age is between 18 to 64, print the following statement (Sorry! You are not a Senior Citizen. You are not eligible to avail the facilities.).iii. If the age of the user is less than 18, print the following statement (Sorry! You are not an adult yet.). *

Answers

Answered by niviode
4

Answer:

class age

{

public static void main (int a)

{

if ( a >= 65 )

system. out. println ("Congratulations! You are eligible to avail the facilities of a Senior Citizen") ;

if ( a >= 18 && a <=64 )

System. out. println (" Sorry! You are not a Senior Citizen. You are not eligible to avail the facilities") ;

if ( a<18 )

System. out. println (Sorry! You are not an adult yet) ;

}

}

Explanation:

hope it helps you

Similar questions