|
@@ -182,6 +182,24 @@ class CodeBox {
|
|
|
this.stack.Push(x - y);
|
|
|
break;
|
|
|
}
|
|
|
+ case "*": {
|
|
|
+ const x = this.stack.Pop();
|
|
|
+ const y = this.stack.Pop();
|
|
|
+ this.stack.Push(x * y);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ case ",": {
|
|
|
+ const x = this.stack.Pop();
|
|
|
+ const y = this.stack.Pop();
|
|
|
+ this.stack.Push(x / y);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ case "%": {
|
|
|
+ const x = this.stack.Pop();
|
|
|
+ const y = this.stack.Pop();
|
|
|
+ this.stack.Push(x % y);
|
|
|
+ break;
|
|
|
+ }
|
|
|
case "n":
|
|
|
output = this.stack.Pop();
|
|
|
break;
|