Computer Science, asked by nitikaaggarwal2333, 2 months ago

Create a program using scanner that will check if the inserted age is a teenager or not. It should only say [you are a teenager] or [you are not a teenager] depending on the input.

Answers

Answered by kashapogulalitha74
0

Answer:

ottssifTisifsrisrisirsrisriraritosirsiraria iwi w the isrxxnxottkdodtotootdtoso

Answered by 1minutememes1208
0

import java.util.*;      

 

public class TeenOrNot      

{

       public static void main(String args[])

       {

            Scanner in = new Scanner(System.in);

              System.out.println("enter the age");

               int age = in.nextInt();

                 if(age>=13 && age<=19)

                 {

                      System.out.println("you are a teenager");

                 }

                 else

                 {

                      System.out.println("you are not a teenager");

                 }

       }

}

Similar questions