This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; | |
public class Calculator { | |
public static void main(String[] args) { | |
double answer, num1, num2; | |
String input = Utils.getInput("Type in Equation"); // type ANY oporation | |
Pattern p = Pattern.compile("\\d+"); // \\d+ allows you to add first digit plus any others |