質問編集履歴

2

2020/05/24 17:15

投稿

ryotazumi
ryotazumi

スコア8

test CHANGED
File without changes
test CHANGED
@@ -192,7 +192,7 @@
192
192
 
193
193
  private boolean isOperator (String token) {
194
194
 
195
- if (token == "+" || token == "-" || token == "*" || token == "/") {
195
+ if (token.equals("+") || token.equals("-") || token.equals("*") || token.equals("/")) {
196
196
 
197
197
  return true;
198
198
 

1

2020/05/24 17:15

投稿

ryotazumi
ryotazumi

スコア8

test CHANGED
File without changes
test CHANGED
@@ -256,13 +256,13 @@
256
256
 
257
257
  switch (s) {
258
258
 
259
- case "+": x = x + y;
259
+ case "+": x = x + y; break;
260
-
260
+
261
- case "-": x = y - x;
261
+ case "-": x = y - x; break;
262
-
262
+
263
- case "*": x = x * y;
263
+ case "*": x = x * y; break;
264
-
264
+
265
- case "/": x = y / x;
265
+ case "/": x = y / x; break;
266
266
 
267
267
  }
268
268