Approaching shortest road trip question till displacement part using if statement. not working properly. plus u are using switch statement and havent taught it

here is my code

#include

using namespace std;

int main()
{
char ch;
signed int x=0;
signed int y=0;
ch=cin.get();
while(ch!=’\n’){
if(ch=‘n’){
y++;
break;
}
if(ch=‘s’){
y–;
break;
}
if(ch=‘w’){
x–;
break;
}
if(ch=‘e’){
x++;
break;
}

ch=cin.get();

}
cout<<x<<","<<y<<endl;

}

@ParthCr7 hey parth this is condition statement if starement work like this
if(ch==‘s’)