https://github.com/devlarley/removeunnecessarybrackets
Created be me, this program removes all unnecessary brackets from a calculation ?1+(2+(3*4)+5)? (Question marks intentional)
https://github.com/devlarley/removeunnecessarybrackets
Last synced: 11 months ago
JSON representation
Created be me, this program removes all unnecessary brackets from a calculation ?1+(2+(3*4)+5)? (Question marks intentional)
- Host: GitHub
- URL: https://github.com/devlarley/removeunnecessarybrackets
- Owner: DevLARLEY
- Created: 2023-07-19T10:38:01.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-12-21T21:30:00.000Z (over 2 years ago)
- Last Synced: 2025-03-02T03:15:55.349Z (over 1 year ago)
- Language: Java
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# RemoveUnnecessaryBrackets
Created be me, this program removes all unnecessary brackets from a calculation ?1+(2+(3*4)+5)? (Question marks intentional). It will solve ANY calculation as long as it doesn't use spceial math-shortforms like: (1+1)(1+1) or 3(1+1) (multiplication operator is left out)
# Requirements
JDK 14.0.2 (Not working on JDK 11, 17).
Please note that when compiling the source file, the same Java version must be used to run the program.
# Compiling
```sh
javac RemoveUnnecessaryBrackets.java
```
# Running
```sh
java RemoveUnnecessaryBrackets ?[CALCULATION]?
```
# Example Output
```sh
((3+4)+(5+6))+((7-8)*(9*(1*2))) --[43ms]-> 3+4+5+6+(7-8)*9*(1*2)
```