fork download
  1. #include<stdio.h>
  2. int main()
  3. {
  4. char w1[100],w2[100],w3[100];
  5. scanf("%s",w1);
  6. scanf("%s",w2);
  7. scanf("%s",w3);
  8. if(!strcmp(w1,"vertebrado"))
  9. {
  10. if(!strcmp(w2,"ave"))
  11. {
  12. if(!strcmp(w3,"carnivoro"))
  13. {
  14. printf("aguia\n");
  15. }
  16. if(!strcmp(w3,"onivoro"))
  17. {
  18. printf("pomba\n");
  19. }
  20.  
  21. }
  22. if(!strcmp(w2,"mamifero"))
  23. {
  24. if(!strcmp(w3,"onivoro"))
  25. {
  26. printf("homem\n");
  27. }
  28. if(!strcmp(w3,"herbivoro"))
  29. {
  30. printf("vaca\n");
  31. }
  32.  
  33. }
  34.  
  35. }
  36. if(!strcmp(w1,"invertebrado"))
  37. {
  38. if(!strcmp(w2,"inseto"))
  39. {
  40. if(!strcmp(w3,"hematofago"))
  41. {
  42. printf("pulga\n");
  43. }
  44. if(!strcmp(w3,"herbivoro"))
  45. {
  46. printf("lagarta\n");
  47. }
  48.  
  49. }
  50. if(!strcmp(w2,"anelideo"))
  51. {
  52. if(!strcmp(w3,"hematofago"))
  53. {
  54. printf("sanguessuga\n");
  55. }
  56. if(!strcmp(w3,"onivoro"))
  57. {
  58. printf("minhoca\n");
  59. }
  60.  
  61. }
  62. }
  63. return 0;
  64. }
  65.  
Success #stdin #stdout 0s 9424KB
stdin
invertebrado
anelideo
onivoro
stdout
minhoca