From York Memorial C.I.
About
💦import java.util.Scanner;
public class TheCardGame_HEnryNguyen
{
public static void main(String [] args)
{
Scanner sc = new Scanner(System.in);//scans
int warriors = sc.nextInt();
int [] ages = new int [warriors];
int noplay = 0;
int play = 0;
for(int x=0; x< warriors; x++)
{
ages[x] = sc.nextInt();
if(ages[x] <= 14 && ages[x] >= 1 )//smaller and equal to
{
noplay++;
}
if(ages[x] > 14)
{
play++;
}
}
if(noplay == 1)
{
System.out.println("1 person is too young to play."); //prints
}
else if(noplay > 1)
{
System.out.println( noplay + " people are too young to play.");
}
if (play > 12)
{
System.out.println("There are too many people who want to play."); //prints
}
if(play == 0 || play <12)
{
System.out.println("There are not enough people to play.");
}
if (play == 12)
{
System.out.println("Time to play!");
}