Skip to content

Files

Latest commit

author
shumatpf
Dec 5, 2018
f7bc58a · Dec 5, 2018

History

History
36 lines (25 loc) · 764 Bytes

README.md

File metadata and controls

36 lines (25 loc) · 764 Bytes

Big Integer Calculator

Description

This program works similar to Java BigInteger in that operations are performed on Strings rather than ints. Each function breaks the Strings into arrays of individual ints and returns a String object. The 4 functions are:

  • Add
  • Subtract
  • Multiply
  • Divide

Instructions

This program requires the JAVA JDK to be installed.

Compile:
javac BigIntCalc.java

Run:
java BigInt [num1] [num2]

or

Call the static methods:
add(str1, str2)
subtract(str1, str2)
multiply(str1, str2)
divide(str1, str2)

Rules

[num1] >= [num2]
[num2] != 0

The program operates [num1] + [num2], [num1] - [num2], etc.