当前位置: 代码迷 >> 综合 >> AcWing 670. 动物
  详细解决方案

AcWing 670. 动物

热度:60   发布时间:2023-12-05 07:33:18.0

AcWing 670. 动物  

#include <iostream>using namespace std;int main()
{string a, b, c;cin >> a >> b >> c;if (a == "vertebrado"){if (b == "ave"){if (c == "carnivoro") cout << "aguia" << endl;else if(c == "onivoro") cout << "pomba" << endl;}if (b == "mamifero"){if (c == "onivoro") cout << "homem" << endl;else if (c == "herbivoro") cout << "vaca" <<endl;}}if (a == "invertebrado"){if (b == "inseto"){if (c == "hematofago") cout << "pulga" << endl;else if (c == "herbivoro") cout <<"lagarta" << endl;}if (b == "anelideo"){if (c == "hematofago") cout << "sanguessuga" << endl;else if (c == "onivoro") cout << "minhoca" << endl;}}return 0;
}