Commit df898c7e by Patryk Czarnik

wyrzucenie oblicz2

parent 07ef6292
...@@ -35,15 +35,4 @@ public class PierwszaUsluga { ...@@ -35,15 +35,4 @@ public class PierwszaUsluga {
} }
} }
public long oblicz2(long liczba1, long liczba2, String operacja) {
return switch(operacja) {
case "+" -> liczba1 + liczba2;
case "-" -> liczba1 - liczba2;
case "*" -> liczba1 * liczba2;
case "/" -> liczba1 / liczba2;
case "%" -> liczba1 % liczba2;
default -> throw new IllegalArgumentException("Nieznana operacja " + operacja);
};
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment