Question: Write a 32-bit x86-64 assembly language program that prompts for and reads sides a and b of a triangle each in centimeters and the angle
Write a 32-bit x86-64 assembly language program that prompts for and reads sides a and b of a triangle each in centimeters and the angle C between these two sides in degrees. It then displays the area of the triangle in square centimeters if the input is valid; otherwise it displays an appropriate error message.(intel processors)
Given two sides a and b of a triangle and the angle C between these two sides, the area of the triangle is given by: area = (a * b * sin C) / 2
Note: The C library defines as the constant M_PI

+Sample program runs: Enter two sides of a triangle in cm and the angle between them in degrees: 10.0 7.0 25.0 The area of the triangle is 14.79 square cm. Enter two sides of a triangle in cm and the angle between them in degrees: a b 50.0 Error: Invalid input. Enter two sides of a triangle in cm and the angle between them in degrees: 5.5 8.7 182.0 Error: Invalid length or invalid angle. airagg.ll.e +Sample program runs: Enter two sides of a triangle in cm and the angle between them in degrees: 10.0 7.0 25.0 The area of the triangle is 14.79 square cm. Enter two sides of a triangle in cm and the angle between them in degrees: a b 50.0 Error: Invalid input. Enter two sides of a triangle in cm and the angle between them in degrees: 5.5 8.7 182.0 Error: Invalid length or invalid angle. airagg.ll.e
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
