AcWing 670. 动物
原题链接
简单
作者:
学习llllll
,
2022-07-06 18:17:35
,
所有人可见
,
阅读 141
#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;
}