/bin/run.sh: line 4: 18 Segmentation fault (core dumped) ./exe
getting this error after compilation
here’s my code
#include
using namespace std;
int main() {
int a[100],n;
for(int i =0; i<n ; i++)
{
int odd = 0;
int even = 0;
cin>>a[i];
if(a[i]%2==0)
{
even=+a[i];
}
else
{
odd=+a[i];
}
if(even%4 ==0 || odd%3 == 0)
{
cout<<"YES"<<endl;
}
else
{
cout<<"NO"<<endl;
}
}
return 0;
}