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: 55% (9 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...
-
Can the need for project infographic designers be eliminated in PM 2.0?
-
List and briefly explain the differences among the three major approaches that automobile accident reparation reform legislation may take.
-
Felter Company produced and sold 50,000 units of product and is operating at 70% of plant capacity. Unit information about its product is as follows: The company received a proposal from a foreign...
-
Now assume that TTC's period of supernormal growth is to last for 5 years rather than 2 years. How would this affect its price, dividend yield, and capital gains yield? D0 1,64 rs 8% gs 6,5% gl 3% a...
-
Lincoln Estates manufactures log homes to customers specifications and uses job order costing. A predetermined overhead rate is used in applying manufacturing overhead to individual jobs. In the...
-
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)...
-
Assume the same facts as in Problem 49, and assume that Suz-Anna pre pares the capital account roll forward on the partners' Schedules K-1 on a tax basis. a. What is Suzy's capital account balance at...
-
Companies in the tire manufacturing business use a lot of property, plant, and equipment. Tyrell Rubber and Tire Corporation and Maxwell Rubber and Tire Manufacturing are two of the leading...
-
(7%) Problem 11: A student launches a small rocket which starts from rest at ground level. At a height h = 2.09 km, the rocket reaches a speed of v = 291 m/s. At that height, the rocket runs out of...
-
2. For the following three sets of electric field lines, what charge or charges would make such lines? Indicate their locations and type of charge (e.g. positive/negative) a.
-
What is the most important take-home point that you learned from this video? https://www.youtube.com/watch?v=nUZqvsF_Wt0 2. Policy Problems. What is onepolicy that creates inequality in the labor...
-
An employee had $20,300 in gross earnings up to September 20, 2021. She has the following information for her pay for the week ending September 27, 2021. Her employer contributes 100% toward CPP and...
-
Draw the shear and moment diagrams for the beam. 15 kN 10 kN/m 20 kN m B F2 m- m -2 m
-
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...
-
a) Define Single Currency and give an example of an economic area that uses a single currency. c) Give one (1) reason that in your opinion would lead a country to leave an economic area that uses a...
-
Question 13 (5 points) Discuss 2 of the 4 criteria used to evaluate the quality of sources when doing literature research (i.e. secondary research)
-
Return Stock A Find the mean and std YEAR 1 14 % deviation. 2 19 3 -13 3 5 20 4 ROA
Study smarter with the SolutionInn App