import java.util.Scanner; public class Main { public static void main(String[] args) { int numOfPets = 10; String[] pets = new String[numOfPets]; Scanner scan = new Scanner(System.in); for (int i = 0; i <= numOfPets; i++) { pets[i] = scan.nextLine(); } for (int i = 0; i <= numOfPets; i++) { if (pets[i].equals("D")){ System.out.println("Your pet is a dog"); } else if (pets[i].equals("C")){ System.out.println("Your pet is a cat"); } else if (pets[i].equals("P")){ System.out.println("Your pet is a parrot"); } else{ System.out.println("Your pet is not recognized"); } } } }