In 1979, Dan Bricklin and Bob Frankston wrote VisiCalc, the first spreadsheet application. It became a huge success and, at that time, was the killer application for the Apple II computers. Today, spreadsheets are found on most desktop computers.
The idea behind spreadsheets is very simple, though powerful. A spreadsheet consists of a table where each cell contains either a number or a formula. A formula can compute an expression that depends on the values of other cells. Text and graphics can be added for presentation purposes.
You are to write a very simple spreadsheet application. Your program should accept several spreadsheets. Each cell of the spreadsheet contains either a numeric value (integers only) or a formula, which only support sums. After having computed the values of all formulas, your program should output the resulting spreadsheet where all formulas have been replaced by their value.
A1 B1 C1 D1 E1 F1 ...
A2 B2 C2 D2 E2 F2 ...
A3 B3 C3 D3 E3 F3 ...
A4 B4 C4 D4 E4 F4 ...
A5 B5 C5 D5 E5 F5 ...
A6 B6 C6 D6 E6 F6 ...
... ... ... ... ... ... ...
Figure 1: Naming of the top left cells