MCPcopy Create free account
hub / github.com/Manvityagi/PW-Skills-Java-Course-Codes / AgeGroup

Class AgeGroup

Lecture 06_Conditionals/src/AgeGroup.java:3–16  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1import java.util.Scanner;
2
3public class AgeGroup {
4 public static void main(String[] args) {
5 Scanner sc = new Scanner(System.in);
6 int age = sc.nextInt();
7
8 if(age <= 12){
9 System.out.println("child");
10 } else if(age > 12 && age < 18){
11 System.out.println("teenager");
12 } else {
13 System.out.println("adult");
14 }
15 }
16}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected