Name: ____________________________________________________ Alpha: _____________________

Describe help received: _________________________________________________________________

  1. [100pts] Write a program that reads in a file like this:
    3
    4
    23 788 12 -6 
    0 2 -337 -8923 
    25656 -89 0 1
    that contains a table of integers in unformatted text, and writes out a file output.html that shows the same table in html, which looks like this
    <table border=2>
    <tr><td>23</td><td>788</td><td>12</td><td>-6</td></tr>
    <tr><td>0</td><td>2</td><td>-337</td><td>-8923</td></tr>
    <tr><td>25656</td><td>-89</td><td>0</td><td>1</td></tr>
    </table>
      and renders like this  
    2378812-6
    02-337-8923
    25656-8901
    You may assume that the file is named input.txt, and that the first line of the file tells you how many rows in the table, the second line tells you how many columns, and that the subsequent lines contain the the values to appear in the table. Look at w3 tables intro if you need a little help with tables in HTML.

    Turn In a printout of your source code, and a printout of the table rendered by the browser when you open the file (use ctrl-o in your browser to open a file) output.html produced by your program with this input file. The result should look like:
    2378812-67
    02-337-89237
    25656-89017
    86714-20