Second Summer 2002

Homework Assignment Four: Adding Up Integers
In this assignment you will be practicing with loops and arrays.

You are to write a program (call it Add.java) that works like this:

N1: 123
N2: 123

123 +
123
----
0246

N1: 123
N2: 901

123 +
901
----
1024

N1: 99999999999999999999999999999999999999999999999999999999999999999999
N2: 1

99999999999999999999999999999999999999999999999999999999999999999999 +
1
---------------------------------------------------------------------
100000000000000000000000000000000000000000000000000000000000000000000

N1: 999999999999999999999999999999999999999999999999999999999999999999999999
N2: 999999999999999999999999999999999999999999999999999999999999999999999990

999999999999999999999999999999999999999999999999999999999999999999999999 +
999999999999999999999999999999999999999999999999999999999999999999999990
-------------------------------------------------------------------------
1999999999999999999999999999999999999999999999999999999999999999999999989

frilled.cs.indiana.edu%
That is,
1. the program prompts the user for two numbers of any length.

2. Reads those numbers one by one, as String's.

3. Turns the Strings into arrays of appropriate size.

4. Allocates space for an array that will hold the result (thier sum).

5. Then calculates the result and prints a report.

You are not allowed to use BigIntegers!