0
Why output is not as mentioned ?
Jungle Camping +10 XP You are camping alone out in the jungle and you hear some animals in the dark nearby. Based on the noise they make, determine which animals they are. Task: You are given the noises made by different animals that you can hear in the dark, evaluate each noise to determine which animal it belongs to. Lions say 'Grr', Tigers say 'Rawr', Snakes say 'Ssss', and Birds say 'Chirp'. Input Format: A string that represent the noises that you hear with a space between them. Output Format: A string that includes each animal that you hear with a space after each one. (animals can repeat) Sample Input: Rawr Chirp Ssss Sample Output: Tiger Bird Snake https://code.sololearn.com/c4GMs0anK1Mh/?ref=app
4 ответов
0
Read the description again..
The problem says, you are given string of voices of some animals as input. Then your Program should output the animals name.
Dibyendu Samanta
Your program missing to take input?
So first you first take inputs, and output animals name which gives that sound by comparing the values.
So you can use if blocks, switch statements..
So if input is Rawr Ssss
then output should be Tiger Snake.
If input is only Rawr
then output should only Tiger
Ex:
if(input=="Rawr")
printf("Tiger");
Or
strcmp function used for string comparison in c, read about it before...
Please read about how to take input, if-else blocks, while loop, if you don't know about these. And then attempt a try for this challenge...
0
What is means? Do you mean why Program is not passing test cases of code coach?
0
Yes
0
👍