Jungle Camping problem | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Jungle Camping problem

#include <iostream> using namespace std; int main() { string reed; string lions = "Grr"; string tigers = "Rawr"; string snakes = "Ssss"; string birds = "Chirp"; while (cin >> reed) { if (reed == lions) cout << "Lion" << " "; else if (reed == tigers) cout << "Tiger" << " "; else if (reed == snakes) cout << "Snake"<<" "; else if (reed == birds) cout << "Birds" << " "; else return 0; } }

2nd Jun 2020, 12:10 PM
Иннокентий Кульчицкий
Иннокентий Кульчицкий - avatar
1 Answer
0
Thanks, I have already solved the problem. the problem was the misspelling of the word bird. Because of this, the task did not pass one check.
2nd Jun 2020, 12:19 PM
Иннокентий Кульчицкий
Иннокентий Кульчицкий - avatar