Programming Project 1 Programming Project #2 COSC XXXXXXXXXX – C Programming Dallas College, Mountain View Campus - Spring 2021 Instructions: Problem statement: Read 3 integer numbers from the user;...


Read 3 integer numbers from the user; these numbers represent the lengths of 3 straight lines. From the 3 lengths, determine whether a triangle can be formed with the corresponding lines. If it is possible to form a triangle, determine whether the triangle is a right triangle or not. Make sure to use #include




Programming Project 1 Programming Project #2 COSC-1420-62001 – C Programming Dallas College, Mountain View Campus - Spring 2021 Instructions: Problem statement: Read 3 integer numbers from the user; these numbers represent the lengths of 3 straight lines. From the 3 lengths, determine whether a triangle can be formed with the corresponding lines. If it is possible to form a triangle, determine whether the triangle is a right triangle or not. The rules to be used are: 1. To form a triangle where all lines’ ends meet (form vertices), the sum of the lengths of two sides must be greater than the length of the third side. This short video illustrates this concept: How to determine if the three sides make up a triangle. 2. Per the Pythagorean theorem: in a straight triangle, the square of the length of the hypotenuse is equal to the sum of the squares of the lengths of the other two sides. 3. The user can enter the lengths of each line in any order, i.e.: you may not assume that the first length is the longest or the smallest or the middle value. Deliverables: 1. First, write an algorithm to solve the problem described above. 2. Write the C code to implement the algorithm you wrote on (1). The algorithm itself must be included in the body of the program as comments. Example output for program run #1: https://www.youtube.com/watch?v=gSmuLNGpf_E Example output for program run #2: Example output for program run #3: Notes: 1. Use only the material covered in this course so far, Chapters 1-4 2. You need to compile and run your program in order to test it before submitting it. 3. Programs with syntax errors will not be accepted. Grading Criteria: 1. Program / Module Description: The first line of the program must be a comment summarizing what the program does: 10% 2. Algorithm. Included in the body of the program as comment: 30% 3. Accuracy of results: 60% Submission: Please submit your program as a file with either the “.c” or “.txt” extension. Email me at [email protected] if you have any questions mailto:[email protected] COSC-1420-62001 – C Programming Problem statement: Deliverables: Notes: Grading Criteria: Submission:
Mar 08, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here