Prepare a program that takes the data from triangletxt


Question: In a right triangle, the square of the length of one side is equal to the sum of the squares of the lengths of the other two sides.

Prepare a program that takes the data from triangle.txt (supplied in this folder) and outputs a message indicating whether the triangle is a right triangle. The text file has data for three triangles.

Then the program prompts the user for three numbers to determine if they could be the sides of a right triangle.

Specially, your program must get the first three numbers from the file and figure out if they are the sides of a right triangle and output a message to both the computer screen as well as an output text file indicating if the first set of data is from a right triangle or not.

Then the program should get the next three numbers and perform the analysis again, outputting the appropriate message, again to both the screen and the output text file.

Similarly for the last set of three numbers. Lastly, the program should prompt the user to input any three numbers to evaluate if those could be the sides of a right triangle or not.

The program should output the sides entered and if they could be the sides of a right triangle to both the video screen and the output file.

I am having difficulty with this program because I do not know where to start with.

Request for Solution File

Ask an Expert for Answer!!
Programming Languages: Prepare a program that takes the data from triangletxt
Reference No:- TGS0960550

Expected delivery within 24 Hours