Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- setlocale(LC_ALL, "Portuguese");
- char resp;
- printf("É mamífero?\n");
- scanf("%c", &resp);
- if(resp == 'S' || resp == 's'){
- fflush(stdin);
- printf("É quadrúpede?\n");
- scanf("%c", &resp);
- if(resp == 'S' || resp == 's'){
- fflush(stdin);
- printf("É carnívoro?\n");
- scanf("%c", &resp);
- if(resp == 'S' || resp == 's')
- printf("É leão\n");
- else{
- fflush(stdin);
- printf("É herbívoro?\n");
- scanf("%c", &resp);
- if(resp == 'S' || resp == 's')
- printf("Cavalo\n");
- else
- printf("Animal desconhecido\n");
- }
- }else{
- fflush(stdin);
- printf("É bípede?\n");
- scanf("%c", &resp);
- if(resp == 'S' || resp == 's'){
- fflush(stdin);
- printf("É onívoro?\n");
- scanf("%c", &resp);
- if(resp == 'S' || resp == 's')
- printf("Homem\n");
- else{
- fflush(stdin);
- printf("É frutífero?\n");
- scanf("%c", &resp);
- if(resp == 'S' || resp == 's')
- printf("Homem\n");
- else
- printf("Animal desconhecido\n");
- }
- }else{
- fflush(stdin);
- printf("É voador?\n");
- scanf("%c", &resp);
- if(resp == 'S' || resp == 's'){
- printf("Morcego\n");
- }else{
- fflush(stdin);
- printf("É aquático?\n");
- scanf("%c", &resp);
- if(resp == 'S' || resp == 's')
- printf("Baleia\n");
- else
- printf("Animal desconhecido\n");
- }
- }
- }
- }else{
- fflush(stdin);
- printf("É ave?\n");
- scanf("%c", &resp);
- if(resp == 'S' || resp == 's'){
- }else{
- //RÉPTEIS
- fflush(stdin);
- printf("É Réptil?\n");
- scanf("%c", &resp);
- if(resp == 'S' || resp == 's'){
- }else
- printf("Animal desconhecido.\n");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement