Advertisement
yurifelix

Untitled

Feb 27th, 2016
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.06 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main() {
  4.     char c1[30],c2[30],c3[30];
  5.     scanf("%s %s %s",c1,c2,c3);
  6.  
  7.     if( strcmp(c1,"vertebrado") == 0){
  8.    
  9.         if( strcmp(c2,"ave") == 0){
  10.        
  11.             if( strcmp(c3,"carnivoro") == 0) printf("aguia\n");
  12.            
  13.             if( strcmp(c3,"onivoro") == 0) printf("pomba\n");
  14.            
  15.         }else if( strcmp(c2,"mamifero") == 0 ){
  16.            
  17.             if( strcmp(c3,"onivoro") == 0) printf("homem\n");
  18.            
  19.             if( strcmp(c3,"herbivoro") == 0) printf("vaca\n");
  20.         }
  21.     }else if(strcmp(c1,"invertebrado") == 0 ){
  22.    
  23.         if( strcmp(c2,"inseto") == 0){
  24.            
  25.             if( strcmp(c3,"hematofago") == 0) printf("pulga\n");
  26.            
  27.             if( strcmp(c3,"herbivoro") == 0) printf("lagarta\n");
  28.            
  29.         }else if( strcmp(c2,"anelideo") == 0 ){
  30.            
  31.             if( strcmp(c3,"hematofago") == 0) printf("sanguessuga\n");
  32.            
  33.             if( strcmp(c3,"onivoro") == 0) printf("minhoca\n");
  34.         }
  35.     }
  36.     return 0;
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement