Write a program that prompts the user to enter three points (x1, y1), (x2, y2), (x3, y3)
Question:
Write a program that prompts the user to enter three points (x1, y1), (x2, y2), (x3, y3) of a triangle and displays its area. The formula for computing the area of a triangle is
Here is a sample run:
Enter three points for a triangle: 1.5 -3.4 4.6 5 9.5 -3.4
The area of the triangle is 33.6
Transcribed Image Text:
(sidel + side2 + side3)/2; V s(s – sidel)(s – ide2)(s – side3) area
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 62% (8 reviews)
Output Enter three points for a triangle 15 34 46 5 59 34 The area of the triangle is 33600000000016 ...View the full answer
Answered By
Joseph Mwaura
I have been teaching college students in various subjects for 9 years now. Besides, I have been tutoring online with several tutoring companies from 2010 to date. The 9 years of experience as a tutor has enabled me to develop multiple tutoring skills and see thousands of students excel in their education and in life after school which gives me much pleasure. I have assisted students in essay writing and in doing academic research and this has helped me be well versed with the various writing styles such as APA, MLA, Chicago/ Turabian, Harvard. I am always ready to handle work at any hour and in any way as students specify. In my tutoring journey, excellence has always been my guiding standard.
4.00+
1+ Reviews
10+ Question Solved
Related Book For
Introduction to Java Programming, Comprehensive Version
ISBN: 978-0133761313
10th Edition
Authors: Y. Daniel Liang
Question Posted:
Students also viewed these Computer science questions
-
Write a method that returns the area of a triangle using the following header:public static double?getTriangleArea(double[][] points)The points are stored in a 3-by-2 two-dimensional array points...
-
Programming Exercise 11.1 defined the Triangle class with three sides. In a triangle, the sum of any two sides is greater than the other side. The Triangle class must adhere to this rule. Create the...
-
Programming Exercise 3.32 shows how to test whether a point is on an unbounded line. Revise Programming Exercise 3.32 to test whether a point is on a line segment. Write a program that prompts the...
-
Consider the many moments of joy in the movie. Why include them? What risky acts of courage do Katherine, Mary and Dorothy take? How are they rewarded? The film shows the strong relationships that...
-
Let Q(t) = t2. As in the previous exercise, find a formula for the average rate of change of Q over the interval [1, t] and use it to estimate the instantaneous rate of change at t = 1. Repeat for...
-
Find the final price of each item. Original price of bedding: $65.95 Tax: 4.5%
-
You need to understand the approach described in question 3 in More Genetic TIPS before answering this question. A gene that is normally expressed in pancreatic cells was cloned and then subjected to...
-
On January 1, 2011, JWS Corporation issued $600,000 of 7% bonds, due in 10 years. The bonds were issued for $559,224, and pay interest each July 1 and January 1. JWS uses the effective-interest...
-
2 1. Let I = S 1 + exc - - ex -dx. 1+ ex 0
-
Indicate whether each of the following statements specify descriptive statistics ( because it describes sets of actual observations) or inferential statistics ( because it generalizes beyond sets of...
-
Write a program that displays the following table. Cast floatingpoint numbers into integers. pow (a, b) 2 2 3 4 81 1024 15625
-
If you know the balance and the annual percentage interest rate, you can compute the interest on the next monthly payment using the following formula: interest = balance * (annualInterestRate/1200)...
-
Show that the set of points equidistant from a circle and a line not passing through the circle is a parabola. Assume the circle, line, and parabola lie in the same plane.
-
About 76% of all female heart transplant patients will survive for at least 3 years. Seventy female heart transplant patients are randomly selected. What is the probability that the sample proportion...
-
Let X and Y has joint density as f(x,y)= (4xy, 0
-
Consider three displacement vectors: A has a length of 3 . 0 m and is directed 7 0 degree south of west; B has a length of 1 0 m and is oriented 3 0 degree northeast; Finally, C has a length of 5 . 0...
-
Joseph Buthelezi, aged 45, runs a successful small garden service and landscaping business as a sole trader. His turnover is greater than R1 million per annum. During the 2019 year of assessment,...
-
Compute the gradient of the following functions: 1. f(x, y) = xy 2. f(x, y) = x + y 3. f(x, y) = e + x In(y) 4. f(x, y, z)=zy + 3x z + xy Question 4. Find the critical points of the following...
-
Refer to the information presented Wetaskiwin Ltd. in P179A. Additional information: 1. Accounts receivable are from the sale of merchandise on credit. 2. Accounts payable relate to the purchase of...
-
Federated Shipping, a competing overnight delivery service, informs the customer in Problem 65 that they would ship the 5-pound package for $29.95 and the 20-pound package for $59.20. (A) If...
-
Write a program that enables the user to specify the location and size of the circles, and displays whether the two circles intersect, as shown in Figure 16.39a. Enable the user to point the mouse...
-
Write a program that sets the horizontal-alignment and column-size properties of a text field dynamically, as shown in Figure 16.38a. Exercise16_06 Text Field JavaFX Left Center Right Column Size 12...
-
Write a program that converts among decimal, hex, and binary numbers, as shown in Figure 16.37c. When you enter a decimal value in the decimal- value text field and press the Enter key, its...
-
The fact that restrictive covenants are widely used does not mean, as NanoMech, Inc. v. Suresh shows, that they are always enforceable. NanoMech, Inc. v. Suresh 777 F.3d 1020 (8th Cir. 2015) OPINION...
-
What are the fundamental distinctions between prokaryotic organisms and their eukaryotic counterparts, particularly concerning cellular structure and organizational complexity?
-
What are the structural and biochemical features of prokaryotic cell membranes and cell walls, and how do these components contribute to cellular integrity, homeostasis, and environmental...
Study smarter with the SolutionInn App