Advertisement
Guest User

Untitled

a guest
May 24th, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. public class CalculatorParser {
  2. public static int evaluate(String text) {
  3. // Tutaj wpisz rozwiązanie
  4. }
  5.  
  6. public static void main(String[] args) {
  7. System.out.println("Wynik operacji 2 + 2: " + evaluate("2 + 2"));
  8. System.out.println("Wynik operacji 5 - 3: " + evaluate("5 - 3"));
  9. System.out.println("Wynik operacji 8 * 2: " + evaluate("8 * 2"));
  10. System.out.println("Wynik operacji 20 / 4: " + evaluate("20 / 4"));
  11. }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement