#include
using namespace std;
int even(int number)
{
if(number%2==0)
return 1;
else
return 0;
}
int main()
{
int N;
cin>>N;
int *arr = new int[N];
int count=0,count1=0;
for(int i=1;i<=N;i++)
{
cin>>arr[i];
if(even(arr[i])==1)
{
count++;
}
else
count1++;
}
if(count < count1)
{
cout<<“NOT READY”<<endl;
}
else
{
cout<<“READY FOR BATTLE”<<endl;
}
return 0;
}
What’s wrong in this code ??
Please tell me, because this code is matching all the outputs of the problem.
Problem Name : Mahasena (Beginers)