i am getting runtime error on this code why?
#include
#include
#include
using namespace std;
int main() {
char A[25];
cin.getline(A,25);
A[strlen(A)]=’ ‘;
int A1[20];
char B[10];int k=0, g=0;
for(int i=0;A[i]!=’\0’;i++)
{
if(A[i]!=’ ')
{
B[k]=A[i];k++;
}
else
{B[k]=’\0’;
char * x = B;
A1[g] = atoi(x);
//cout<<“no “<<g<<” - “<<A1[g]<<”\n”;
k=0;g++;
}}
cin.ignore();
int C[20];
for(int k1=0;k1<A1[0];k1++)
{
cin>>C[k1];
}
for(int k11=0;k11<A1[0];k11++)
{
if(C[k11]>A1[1])
cout<<“Good boi \n”;
else
cout<<“Bad boi \n”;
}
}