package dodatkowe;

import java.util.Scanner;

public class Kalkulator {

	public static void main(String[] args) {
		try(Scanner sc = new Scanner(System.in)) {
			System.out.println("Podaj działanie, np. 2 + 2");
			int x = sc.nextInt();
			String op = sc.next();
			int y = sc.nextInt();
			
			var wynik = switch(op) {
				case "+" -> x + y;
				case "-" -> x - y;
				case "*" -> x * y;
				case "/" -> x / y;
				default -> 0;
			};
			
			System.out.println("Wynik: " + wynik);
		}
	}

}
