Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<iomanip>
- #include<string.h>
- using namespace std;
- int main()
- {
- char s[50];
- cin>>s;
- if(!strcmp(s,"vertebrado"))
- {
- cin>>s;
- if(!strcmp(s,"ave"))
- {
- cin>>s;
- if(!strcmp(s,"carnivoro"))
- {
- cout<<"aguia"<<endl;
- }
- else if(!strcmp(s,"onivoro"))
- cout<<"pomba"<<endl;
- }
- else if(!strcmp(s,"mamifero"))
- {
- cin>>s;
- if(!strcmp(s,"onivoro"))
- {
- cout<<"homen"<<endl;
- }
- else if(!strcmp(s,"herbivoro"))
- {
- cout<<"vaca"<<endl;
- }
- }
- }
- //////////////////////////////////////
- else if(!strcmp(s,"invertebrado"))
- {
- cin>>s;
- if(!strcmp(s,"inseto"))
- {
- cin>>s;
- if(!strcmp(s,"hematofago"))
- {
- cout<<"pulga"<<endl;
- }
- else if(!strcmp(s,"herbivoro"))
- cout<<"lagarta"<<endl;
- }
- else if(!strcmp(s,"anelideo"))
- {
- cin>>s;
- if(!strcmp(s,"hematofago"))
- {
- cout<<"sanguessuga"<<endl;
- }
- else if(!strcmp(s,"onivoro"))
- {
- cout<<"minhoca"<<endl;
- }
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement