aboutsummaryrefslogtreecommitdiff
path: root/Calculator.java
diff options
context:
space:
mode:
authorkrolxon <krolyxon@tutanota.com>2024-02-17 20:45:28 +0530
committerkrolxon <krolyxon@tutanota.com>2024-02-17 20:45:28 +0530
commit36f19c62c2266973818908a10d7962f055714db2 (patch)
tree2ca9ac107e458c48e57aed807be1b708d6c1d060 /Calculator.java
parent6186556a8424a636fd55ef1d5fe4aabebdbe2c49 (diff)
add build script
Diffstat (limited to 'Calculator.java')
-rw-r--r--Calculator.java30
1 files changed, 0 insertions, 30 deletions
diff --git a/Calculator.java b/Calculator.java
deleted file mode 100644
index c43ca9f..0000000
--- a/Calculator.java
+++ /dev/null
@@ -1,30 +0,0 @@
-import java.util.Scanner;
-
-public class Calculator {
- public static void main(String[] args) {
- // String expr = "(84 / 4 * 3 - 9) * 2 + 1 / 5"; // 108.2
- String expr = new String(" ");
- Scanner sc = new Scanner(System.in);
- Parser p;
-
- if (args.length == 0) {
- new GFrame("Calculator");
- } else {
- if (args[0].equals("-n")) {
- System.out.println("Type \"exit\" or Ctrl+C to exit.");
- while (true) {
- System.out.print(">>> ");
- expr = sc.nextLine();
- if (!expr.equals("exit")) {
- p = new Parser(expr);
- System.out.println(p.eval());
- } else {
- sc.close();
- break;
- }
- }
- } else {
- }
- }
- }
-}