Windows Batch, 204204 256
@echo off
set a=0
:a
set /p i=^>^>
if %i%==i set /a a=%a%+1
if %i%==x set /a a=%a%+1
if %i%==d set /a a=%a%-1
if %i%==s set /a a=%a%*%a%
if %i%==k set /a a=%a%*%a%
if %i%==o echo %a%
if %i%==c echo %a%
if %a%==256 set a=0
if %a%==-1 set a=0
set i=n
goto a
Successfully ignores other commands. Really got bloated without having or
to work with...
Edit:
Fixed:
- No more Echoing all commands
- Made it actually DO math with /a
- Reset on -1
- Reset input after every cycle
This cost 52 characters.
Didn't fixed:
- Squaring 0 writes "0*0" in a.
- Inputting space (or inputing nothing, when you just opened it) crashes script.
- You NEED to input one char at a time.