Saturday 19 July 2014

Write a C function to compute the distance between two points A and B where each point has two values x and y. i.e. A(x1, y1), B(x2, y2). distance=d=√(〖(x_2-x_1)〗^2+〖(y_2-y_1)〗^2 ) Modify the code in part a) and calculate the distance between 3 points. You have to calculate the distance between A and B, B and C, and finally between A and C. Now consider that these three points are forming a triangle. Develop a logic that can lead to calculate the area of this triangle. Implement your logic in C language. Take necessary inputs and display the results.

Leave a Comment
If You Enjoyed This, Take 5 Seconds To Share It

0 Questions: