f=@(x)['NESSWNW'](mod(sum(x),8));f('N/')f('N\')f('E/')f('E\')f('S/')f('S\')f('W/')f('W\')
Standard input is empty
ans = W ans = E ans = S ans = N ans = E ans = W ans = N ans = S
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!