wrote and the program worked on different IDEs but when i run it on codechef …it shows SIGTSTP error…can anyone point out the mistake?
The problem is this.
#include <stdio.h>
#include <stdlib.h>
int main()
{
int i=0;
char temp;
int sol_num;
int ready=0;
int not_ready=0;
scanf("%d",&sol_num);
int arr[sol_num];
do
{
scanf("%d%c", &arr[i], &temp);
i++;
}
while(temp != '\n');
for(int j=0;j<i;j++)
{
if((arr[j]%2)==0)
{
ready++;
}
else
{
not_ready++;
}
}
if(ready>not_ready)
{
printf("READY FOR BATTLE");
}
else
{
printf("NOT READY FOR BATTLE");
}
}