Easy code, but many errors 😰
import java.util.Scanner; public class calculator { public static void main(String[] args) { Scanner calc = new Scanner(System.in); System.out.println("Enter 1st number ____.(In order)"); double num1 = calc.nextInt(); System.out.println("Enter 2nd number ____.(In order)"); double num2 = calc.nextInt(); System.out.println("Enter the operation ____.(+ for addition, - for subtraction, * for multiplication and / for division)"); String operator = calc.nextLine(); switch(operator) { case "+": System.out.println("Sum of " + num1 + "and " + num2 + "is " + num1+num2); break; case "-": System.out.println("Difference of " + num1 + "and " + num2 + "is " + num1-num2); break; case "*": System.out.println("Product of " + num1 + "and " + num2 + "is " + num1*num2); break; case "/": System.out.println("Division of " + num1 + "and " + num2 + "is " + num1/num2); break; default: System.out.println("Noob i said you to type +/-/*// and you typed none Shame on you.") } } } ERROR: ./Playground/calculator.java:31: error: ';' expected System.out.println("Noob i said you to type +/-/*// and you typed none Shame on you.") ^ 1 error