Answer to Question #268049 in Algorithms for dede

Question #268049

HAND TRACING

Accept the two sides and an angle included by these two sides, and find the area and third side of a triangle.

 (1) Display "Enter two sides and an angle:"

(2) Accept a, b,theta

(3) ang = theta * 3.14 / 180;

(4) third_side = sqrt (a*a + b*b - 2*a*b* cos(ang))

(5) area = ½*a*b* sin(ang)

(6) Display "Third_side =",third_side,"Area =", area

(7) Exit


1
Expert's answer
2021-11-18T06:56:19-0500
Start
   Declare variables a, b,theta,ang
   Display "Enter two sides and an angle:"
   Read a
   Read b  
   Read theta
   Set ang = theta * 3.14 / 180;
   Set third_side = sqrt (a*a + b*b - 2*a*b* cos(ang))
   Set area = 1/2*a*b* sin(ang)
   Display "Third_side =",third_side,"Area =", area
Stop

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS