+ 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; } }
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.