Advertisement
Jvsierra

Untitled

Mar 3rd, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.80 KB | None | 0 0
  1. setlocale(LC_ALL, "Portuguese");
  2.  
  3. char resp;
  4.  
  5. printf("É mamífero?\n");
  6. scanf("%c", &resp);
  7.  
  8. if(resp == 'S' || resp == 's'){
  9. fflush(stdin);
  10.  
  11. printf("É quadrúpede?\n");
  12. scanf("%c", &resp);
  13.  
  14. if(resp == 'S' || resp == 's'){
  15. fflush(stdin);
  16.  
  17. printf("É carnívoro?\n");
  18. scanf("%c", &resp);
  19.  
  20. if(resp == 'S' || resp == 's')
  21. printf("É leão\n");
  22. else{
  23. fflush(stdin);
  24.  
  25. printf("É herbívoro?\n");
  26. scanf("%c", &resp);
  27.  
  28. if(resp == 'S' || resp == 's')
  29. printf("Cavalo\n");
  30. else
  31. printf("Animal desconhecido\n");
  32.  
  33. }
  34. }else{
  35. fflush(stdin);
  36.  
  37. printf("É bípede?\n");
  38. scanf("%c", &resp);
  39.  
  40. if(resp == 'S' || resp == 's'){
  41. fflush(stdin);
  42.  
  43. printf("É onívoro?\n");
  44. scanf("%c", &resp);
  45.  
  46. if(resp == 'S' || resp == 's')
  47. printf("Homem\n");
  48. else{
  49. fflush(stdin);
  50.  
  51. printf("É frutífero?\n");
  52. scanf("%c", &resp);
  53.  
  54. if(resp == 'S' || resp == 's')
  55. printf("Homem\n");
  56. else
  57. printf("Animal desconhecido\n");
  58.  
  59. }
  60. }else{
  61. fflush(stdin);
  62.  
  63. printf("É voador?\n");
  64. scanf("%c", &resp);
  65.  
  66. if(resp == 'S' || resp == 's'){
  67. printf("Morcego\n");
  68. }else{
  69. fflush(stdin);
  70.  
  71. printf("É aquático?\n");
  72. scanf("%c", &resp);
  73.  
  74. if(resp == 'S' || resp == 's')
  75. printf("Baleia\n");
  76. else
  77. printf("Animal desconhecido\n");
  78. }
  79. }
  80. }
  81.  
  82. }else{
  83. fflush(stdin);
  84.  
  85. printf("É ave?\n");
  86. scanf("%c", &resp);
  87.  
  88. if(resp == 'S' || resp == 's'){
  89.  
  90. }else{
  91. //RÉPTEIS
  92. fflush(stdin);
  93.  
  94. printf("É Réptil?\n");
  95. scanf("%c", &resp);
  96.  
  97. if(resp == 'S' || resp == 's'){
  98.  
  99. }else
  100. printf("Animal desconhecido.\n");
  101. }
  102. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement