Whats wrong with Jungle Camping?[SOLVED]
This is my code but it is failing last test case What's wrong? https://code.sololearn.com/cJBQgfgEsuAm/?ref=app My code is not getting public, it says "Can't mKe your code public so am Posting here" // Input sounds #include <iostream> #include <string> using namespace std; int main() { string str, str1, str2, str3, str4; cin >> str1; cin >> str2; cin >> str3; cin >> str4; str = str1 + str2 + str3 + str4; //your code goes here string sound("GRSC"); string final; char lion = sound[0]; char tiger = sound[1]; char snake = sound[2]; char bird = sound[3]; int strL = str.size(); for(int i = 0; i < strL; i++){ char letter = str[i]; if(letter == lion){ final += "Lion "; } if(letter == tiger){ final += "Tiger "; } if(letter == snake){ final += "Snake "; } if(letter == bird){ final += "Bird "; } }