Quick News: Atrinik Client 4.0 has been released!
// Imports the Scanner which is needed for user// input.import java.util.Scanner;public class JCalc { public static void main(String[]args) { // What you see at the start of the program. System.out.println("Please choose a operation: 1.Add 2.Subtract 3.Divide 4.Multiply"); Scanner scan = new Scanner(System.in); // Prompts user for the operation number. System.out.println("Please select your operation: "); int op = scan.nextInt(); // Prompts user for the first number. System.out.println("Please enter the first number: "); int num1 = scan.nextInt(); // Prompts user for the second number. System.out.println("Please enter the second number: "); int num2 = scan.nextInt(); // Addition if (op == 1) { int add = num1 + num2; System.out.println("The answer: " + add); } // Subtraction if (op == 2) { int sub = num1 - num2; System.out.println("The answer: " + sub); } // Division if (op == 3) { int div = num1 / num2; System.out.println("The answer: " + div); } // Multiplication if (op == 4) { int mul = num1 * num2; System.out.println("The answer: " + mul); } }}