Given your Triangle Evaluator developed in A-09, modify a copy of it to add a log file as follows:
COPY your folder “triangle” and all of its contents into a new folder “triangle_log”. Edit the contents of that folder to meet the new log file requirement. [Do not modify your A-09 files as part of this work; Leave the folder “triangle” alone.]
Create an empty text file named “mytri.log” in the folder “triangle_log”.
Change your script(s) in triangle_log so, whenever the program determines its conclusion for a set of 3 numbers entered, the program will APPEND an entry in the log file “mytri.log”.
A log entry (line) is to have this format:
the ASCII newline character (the double-quotes string “n” in PHP); then,
the three input values each followed by a semi-colons (;); then,
a short phrase summarizing the triangle conclusion (e.g. Scalene).
For example (where the n is the location of the ASCII newline char):
The 0,0,0 that stops the script should not be entered in the log file.
No other change to the prior Triangle Evaluator is needed. Just add the Log File capability.