Math, asked by arunsharmah4, 5 months ago

write a program to input the age of a person. if the age is equal to 15 than print "you are welcome to teen club". if the age is equal to 60, print "you are welcome to senior citizens club". else print "you are welcome as a guest"



PLEASE SOLVE THIS QUESTION​

Answers

Answered by anindyaadhikari13
11

Answer:-

This is the required program for the question.

import java.util.*;

class Age

{

public static void main(String s[])

{

Scanner sc=new Scanner(System.in);

System.out.println(*Enter your age: ");

int age=sc.nextInt();

if(age==15)

System.out.println("You are welcomed to teen club.");

else if(age==60)

System.out.println("You are welcomed to senior citizen club.");

else

System.out.println("You are welcomed as a guest.");

}

}

Similar questions