Question: Write a structured program using basic java programming that can accept two integer numbers up to 40 digits and perform the followings: 1. Add the
Write a structured program using basic java programming
that can accept two integer numbers up to 40 digits and perform the followings:
1. Add the two numbers and display the result.
2. The result number should be separated by commas. For example
If inputs are:
Number1: 236598745632
Number2: 2453254365546764765
The output should be:
236,598,745,632 +
2,453,254,365,546,764,765
-------------------------------------
2,453,254,602,145,510,397
Notes:
You must read the two input numbers as string objects, then verify if the input is correct (i.e. all digit characters).
You may assume that your program only works for positive integer numbers.
You cannot use any of BigDecimal / BigInteger / double / long / int types for your calculations.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
