Simple codes for calculator in various formats by Devansh Mishra.
In java - I'm trying to create a basic calculator in Java. I'm quite new to programming so I'm trying to get used to it. import java.util.Scanner; import javax.swing.JOptionPane; public class javaCalculator { public static void main(String[] args) { int num1; int num2; String operation; Scanner input = new Scanner(System.in); System.out.println("please enter the first number"); num1 = input.nextInt(); System.out.println("please enter the second number"); num2 = input.nextInt(); Scanner op = new Scanner(System.in); System.out.println("Please enter operation"); operation = op.next(); if (operation == "+"); ...