I need to write a program square that calculates the squares of all numbers that are contained in a file of floating point numbers. The obtained new numbers form a new file. For example if the file contains the numbers 1, 2.5, 0.1, the numbers 1, 6.25 and 0.01 form the resulting file. The file names are specified on the command line:
square data.txt squares.txt
Thanks in advance! :)