AcWing 670. 动物
原题链接
简单
作者:
wmh123
,
2022-07-06 18:26:39
,
所有人可见
,
阅读 132
#include <iostream>
//#include <string>
using namespace std;
int main()
{
string a, b, c;//如果用scanf输入,需要用str.resize(N)声明变量大小,在用%s。所以用cin
cin >> a >> b >> c;
if (a == "vertebrado")
{
if (b == "ave")
{
if (c == "carnivoro") cout << "aguia";
else cout << "pomba";
}
else
{
if (c == "onivoro") cout << "homem";
else cout << "vaca";
}
}
else
{
if (b == "inseto")
{
if (c == "hematofago") cout << "pulga";
else cout << "lagarta";
}
else
{
if (c == "hematofago") cout << "sanguessuga";
else cout << "minhoca";
}
}
return 0;
}