forked from sarkerrabi/URI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
1049.c
48 lines (45 loc) · 1.24 KB
/
1049.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#include<stdio.h>
#include<string.h>
int main(){
char a[80],b[80],c[80];
gets(a);
gets(b);
gets(c);
if(strcmp(a,"vertebrado")==0){
if(strcmp(b,"ave")==0){
if(strcmp(c,"carnivoro")==0){
printf("aguia\n");
}
if(strcmp(c,"onivoro")==0){
printf("pomba\n");
}
}
if(strcmp(b,"mamifero")==0){
if(strcmp(c,"onivoro")==0){
printf("homem\n");
}
if(strcmp(c,"herbivoro")==0){
printf("vaca\n");
}
}
}
if(strcmp(a,"invertebrado")==0){
if(strcmp(b,"inseto")==0){
if(strcmp(c,"hematofago")==0){
printf("pulga\n");
}
if(strcmp(c,"herbivoro")==0){
printf("lagarta\n");
}
}
if(strcmp(b,"anelideo")==0){
if(strcmp(c,"hematofago")==0){
printf("sanguessuga\n");
}
if(strcmp(c,"onivoro")==0){
printf("minhoca\n");
}
}
}
return 0;
}