Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.36 KB | None | 0 0
  1. #include<iostream>
  2. #include<iomanip>
  3.  
  4. #include<string.h>
  5.  
  6. using namespace std;
  7.  
  8. int main()
  9. {
  10.  
  11.     char s[50];
  12.     cin>>s;
  13.     if(!strcmp(s,"vertebrado"))
  14.     {
  15.             cin>>s;
  16.               if(!strcmp(s,"ave"))
  17.     {
  18.                     cin>>s;
  19.                      if(!strcmp(s,"carnivoro"))
  20.     {
  21.         cout<<"aguia"<<endl;
  22.     }
  23.                 else if(!strcmp(s,"onivoro"))
  24.                     cout<<"pomba"<<endl;
  25.     }
  26.     else if(!strcmp(s,"mamifero"))
  27.     {
  28.         cin>>s;
  29.         if(!strcmp(s,"onivoro"))
  30.         {
  31.             cout<<"homen"<<endl;
  32.         }
  33.         else if(!strcmp(s,"herbivoro"))
  34.         {
  35.             cout<<"vaca"<<endl;
  36.         }
  37.     }
  38.     }
  39.     //////////////////////////////////////
  40.     else if(!strcmp(s,"invertebrado"))
  41.     {
  42.             cin>>s;
  43.               if(!strcmp(s,"inseto"))
  44.     {
  45.                     cin>>s;
  46.                      if(!strcmp(s,"hematofago"))
  47.     {
  48.         cout<<"pulga"<<endl;
  49.     }
  50.                 else if(!strcmp(s,"herbivoro"))
  51.                     cout<<"lagarta"<<endl;
  52.     }
  53.     else if(!strcmp(s,"anelideo"))
  54.     {
  55.         cin>>s;
  56.         if(!strcmp(s,"hematofago"))
  57.         {
  58.             cout<<"sanguessuga"<<endl;
  59.         }
  60.         else if(!strcmp(s,"onivoro"))
  61.         {
  62.             cout<<"minhoca"<<endl;
  63.         }
  64.     }
  65.     }
  66.  
  67.  
  68.  
  69. return 0;
  70.  
  71. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement