Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- char i1[20], i2[20], i3[20];
- scanf("%s %s %s", &i1, &i2, &i3);
- if(strcmp(i1, "vertebrado")==0)
- {
- if(strcmp(i2, "ave")==0)
- {
- if(strcmp(i3, "carnivoro"))
- {
- printf("aguia\n");
- }
- else if(strcmp(i3, "onivoro"))
- {
- printf("pomba\n");
- }
- }
- else if(strcmp(i2, "mamifero"))
- {
- if(strcmp(i3, "onivoro"))
- {
- printf("homem\n");
- }
- else if(strcmp(i3, "herbivoro"))
- {
- printf("vaca\n");
- }
- }
- }
- else if(strcmp(i1, "invertebrado"))
- {
- if(strcmp(i2, "inseto"))
- {
- if (strcmp(i3, "hematofago"))
- {
- printf("pulga\n");
- }
- else
- {
- printf("lagarta\n");
- }
- }
- else
- {
- if (strcmp(i3, "hematofago"))
- {
- printf("sanguessuga\n");
- }
- else
- {
- printf("minhoca\n");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement