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;
}