Shopping game problem

Can someone help me in trying to explain the approach and code please i am not able to make the logic too

Hi Akshat,
u can refer this code https://ide.codingblocks.com/s/28532

i hope its clear now??

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.

u still have any doubt??

yes the code you sent is not opening

vaibhav the code you sent is not opening can you send another link??

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.

vaibhav the code link is not opening please help give me another link

hi @akshat42bajpai
sry for the delay… here’s the updated link https://ide.codingblocks.com/s/641939

I’m unable to see this code. Why ?

#include

using namespace std;

long int odd(long int m){

int i=1;

long int sum=0;

do{

    //int i=1;

    //sum<m;

    sum+=i;

    i+=2;

}while(sum<m);

return sum;

}

long int even(long int n){

long int i=0;

long int sum=0;

do{

   // int a=2;

    //sum<n;

    sum+=i;

    i+=2;

   

}while(sum<n);

return sum;

}

int main (){

//take input for number of test case

int t;

cin>>t;

long int m,n;

int c,d;

c=t;

d=2;

int a[c][d];

for(int i=0;i<t;i++){

    for(int j=0;j<2;j++){

       cin>>a[i][j];

    }

}

//Aayush

//Harshit

for(int i=0;i<t;i++){

    long int m=a[i][0];

    long int n=a[i][1];

    if(m>n){

        cout<<"Aayush"<<endl;

    }

    else{

        cout<<"Harshit"<<endl;

    }

}

}

can anyone tell what is wrong in this.Last test case is not satisfied