We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c984ac0 commit 5b6ad96Copy full SHA for 5b6ad96
app/src/main/java/hexlet/code/games/Calc.java
@@ -11,10 +11,11 @@ public static void startGame() {
11
for (int i = 0; i < Engine.ROUNDS; i++) {
12
int num1 = Utils.generateNumber(0, 100);
13
int num2 = Utils.generateNumber(0, 100);
14
+ char mathSymbol = getRandomMathSymbol();
15
- String question = num1 + " " + getRandomMathSymbol() + " " + num2;
16
+ String question = num1 + " " + mathSymbol + " " + num2;
17
- int result = switch (getRandomMathSymbol()) {
18
+ int result = switch (mathSymbol) {
19
case '+' -> num1 + num2;
20
case '-' -> num1 - num2;
21
case '*' -> num1 * num2;
0 commit comments