Beecrowd 1049 Animal Solution

Beecrowd 1049 Animal Solution

Animal

Introduction

In this guide, we will be discussing the Beecrowd 1049 Animal problem and providing a detailed solution in C, C++, C++, and Python. Our goal is to help readers understand the problem, provide a clear and concise solution, and offer tips on how to improve their programming skills.

URI(Beecrowd ) 1049 Animal Problem

The Beecrowd 1049 Animal problem is a popular programming problem that requires programmers to write a program that accepts three strings as input and outputs a specific animal based on the input. The first input string represents the animal’s class, the second input string represents the animal’s order, and the third input string represents the animal’s species.

Solution in CPP

#include<iostream>
#include<string>
using namespace std;
int main()
{
    string a,b,c;
    getline(cin,a);
    getline(cin,b);
    getline(cin,c);

    if(a=="vertebrado")
    {
        if(b=="ave")
        {
            if(c=="carnivoro")
                cout<<"aguia"<<endl;
            else
            {
                cout<<"pomba"<<endl;
            }
        }
        else if(b=="mamifero") {
            if(c=="onivoro")
        {
            cout<<"homem"<<endl;
        }
        else
        {
            cout<<"vaca"<<endl;
        }
        }
    }
    else if(a=="invertebrado") {
        if(b=="anelideo")
Beecrowd 1049 Animal Solution

Previous problem:URI Bee Crowd 1095: How to Solve the Sequence IJ-1 Problem

1 thought on “Beecrowd 1049 Animal Solution”

  1. Pingback: URI Bee Crowd 1095: How to Solve the Sequence IJ-1 Problem - Free Code Center

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top
NEW TOXIC ROCKET CYCLE DECK in Clash Royale 2023 Best Deck in Clash Royale Best Deck for Arena 8 in Clash Royale Best Hog deck for Pro players Best Clash Royale Deck