Help with Jungle Camping C++ [Solved]
Code Works for first 4 tests, fails 5th. I have tried using dozens of input attempts, all print correctly. 5th test is hidden so I can't see expected result. The code is linked so easy to test. I also included the description of challenge below the code. Any suggestions are welcome. #include <iostream> using namespace std; int main() { string sound[]={"Grr", "Rawr", "Ssss", "Chirp"}; string input[4]; cin >> input[0] >> input[1] >> input[2] >> input[3] ; for (int x=0; x<4; x++){ if (input[x] == sound[0]){ cout << "Lion "; }else if (input[x] == sound[1]){ cout << "Tiger "; }else if (input[x] == sound[2]){ cout << "Snake "; }else if (input[x] == sound[3]){ cout << "Bird "; } } return 0; } https://code.sololearn.com/c5LiCFp5uzmD/?ref=app