My issue
how is total no of legs related to legs of each chicken and duck?
My code
#include <iostream>
using namespace std;
int main() {
int t;
cin >> t;
for(int i; i<t ; i++){
int x;
int y;
int z;
cin >> x>> y>> z;
if (z = x+y){
cout << "none\n";
}
else if (z=y=x){
cout << "any\n";
}
else if (z < x+y ){
if (x>y){
cout <<"chicken\n";
}
else {
cout << "duck\n";
}
}
}
// your code goes here
return 0;
}
Problem Link: Chef and Bird farm Practice Coding Problem - CodeChef