0
I am getting 4 test correct .5th test not getting plz can you help anyone. This program is for Jungle Camping
#include <iostream> #include <string> using namespace std; int main() { int i; string a, b, c ,d, sounds[5]; a="Grr"; b="Rawr"; c="Ssss"; d="Chirp"; cin>>sounds [0]; cin>>sounds [1]; cin>>sounds [2]; cin>>sounds [3]; for(i=0;i<4;i++) { if(sounds [i]==a) cout <<"Lion "; if(sounds [i]==b) cout <<"Tiger "; if(sounds [i]==c) cout <<"Snake "; if(sounds [i]==d) cout <<"Bird "; } return 0; }
1 Resposta
+ 2
Inputs could be more than 4 like :
Grr Rawr Ssss Ssss Chirp Chirp