-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path1049.cpp
More file actions
48 lines (40 loc) · 1.2 KB
/
1049.cpp
File metadata and controls
48 lines (40 loc) · 1.2 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
43
44
45
46
47
48
#include <iostream>
using namespace std;
int main ()
{
string vertebra, tipo, alimentacao;
cin >> vertebra >> tipo >> alimentacao;
if (vertebra == "vertebrado") {
if ( tipo == "ave") {
if ( alimentacao == "carnivoro") {
cout << "aguia" << endl;
} else if (alimentacao == "onivoro") {
cout << "pomba" << endl;
}
}
else if ( tipo == "mamifero") {
if ( alimentacao == "onivoro") {
cout << "homem" << endl;
} else if (alimentacao == "herbivoro") {
cout << "vaca" << endl;
}
}
}
else if ( vertebra == "invertebrado") {
if ( tipo == "inseto") {
if ( alimentacao == "hematofago") {
cout << "pulga" << endl;
} else if ( alimentacao == "herbivoro") {
cout << "lagarta" << endl;
}
}
if ( tipo == "anelideo") {
if ( alimentacao == "hematofago") {
cout << "sanguessuga" << endl;
} else if ( alimentacao == "onivoro") {
cout << "minhoca" << endl;
}
}
}
return 0;
}