Assignment #1 .. Find the Root
Your program should read a set of floating point numbers from an input
file named input.txt
It should create an output file named output.txt
It should write into output.txt the square root of every number in
input.txt
If the input number is negative, just put a -1 (an error code).
If your program can find n'th roots, you get another point. You
never have to compute about negative roots (Just print -1). All
roots are integers.
This program is worth five points. Minus 1 point for every day
after Fri the 16th. YOU MUST USE YOUR OWN SQUARE ROT FUNCTION AS
DESCRIBED IN CLASS>
Sample input file
4.0
25.1
-3.2
0
12.5
Sample output file
2.0
5.00999002
-1
0
3.535533906
Sample input file for n'th roots
4.0 2
25.1 3
-3.2 1
0 17
12.5 -3
Sample output file for n'th roots
2.0
2.927911242
-1
0
-1