-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathURI_1049.java
More file actions
42 lines (35 loc) · 1.19 KB
/
Copy pathURI_1049.java
File metadata and controls
42 lines (35 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import java.io.IOException;
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws IOException {
String A, B, C;
Scanner input =new Scanner(System.in);
A = input.next();
B = input.next();
C = input.next();
if (A.equals("vertebrado") && B.equals("ave") && C.equals("carnivoro")) {
System.out.print("aguia\n");
}
if (A.equals("vertebrado") && B.equals("ave") && C.equals("onivoro")) {
System.out.print("pomba\n");
}
if (A.equals("vertebrado") && B.equals("mamifero") && C.equals("onivoro")) {
System.out.print("homem\n");
}
if (A.equals("vertebrado") && B.equals("mamifero") && C.equals("herbivoro")) {
System.out.print("vaca\n");
}
if (A.equals("invertebrado") && B.equals("inseto") && C.equals("hematofago")) {
System.out.print("pulga\n");
}
if (A.equals("invertebrado") && B.equals("inseto") && C.equals("herbivoro")) {
System.out.print("lagarta\n");
}
if (A.equals("invertebrado") && B.equals("anelideo") && C.equals("hematofago")) {
System.out.print("sanguessuga\n");
}
if (A.equals("invertebrado") && B.equals("anelideo") && C.equals("onivoro")) {
System.out.print("minhoca\n");
}
}
}