Question

3. Write a program to calculate the area of a triangle. Your program will take the length of two sides and the included angle
0 0
Add a comment Improve this question Transcribed image text
Answer #1

#include <iostream>

#include <cmath>

using namespace std;

int main() {

double a, b, C;

cout << "Enter length of side 1: ";

cin>>a;

cout << "Enter length of side 2: ";

cin>>b;

cout << "Enter angle in degrees: ";

cin>>C;

double radian = 0.0174533*C;

cout << "Area is: "<<a*b*sin(radian)/2;

}

==================
As language is not mentioned, did in C++. Let me know if you need in any other language

SEE OUTPUT

Files https://FavoriteDentalDatabase.rahulkumar29.re main.cpp ... nm > clang++-7 -pthread -std=c++17 -0 m } ./main Enter leng

========================================
Thanks, let me now if there is any concern.

Add a comment
Answer #2

write it in C programming.

Add a comment
Know the answer?
Add Answer to:
3. Write a program to calculate the area of a triangle. Your program will take the...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Write a program to compute the area of a triangle using side-angle-side method and reports the...

    Write a program to compute the area of a triangle using side-angle-side method and reports the area of that triangle (rounded to 2 decimal places). Side-angle-side formula: ???? = 1/ 2 ?? sin(?), where a and b are two sides of the triangle, and C is the included angle. Your program must meet the following criteria to receive full marks: • Randomly generate two values between 5 and 10 (inclusive) for two sides a and b of the triangle, respectively....

  • Problem a (PA4a.java) Write a program to evaluate the area of a triangle given the lengths...

    Problem a (PA4a.java) Write a program to evaluate the area of a triangle given the lengths of its sides using Heron's Formula. Here is an outline: Get the three side lengths from the user (which might have decimal values): a, b, c. Check to ensure that the sides are valid for a triangle. Importantly, the sum of the lengths of any two sides must be larger than the length of the third side (you must check all three sides this...

  • 10. Use Heron's formula to calculate the area of a triangle. In below formula, a, b,...

    10. Use Heron's formula to calculate the area of a triangle. In below formula, a, b, and c are the length of 3 sides of a triangle: s (a+b+c]/2 A Vs(s-a) (s-b) (s- e) Write a program to calculate area of triangle. Input a, b, e from console and display area.

  • 18. The area A of a of a triangle with sides of lengths a and b...

    18. The area A of a of a triangle with sides of lengths a and b and with included angle is given by the formula: A=0 A= Rp2 A= √3(s - a)(sb) A=r0 A = sab sin() Question 18 of 29

  • 2. Write a program that prompts a user to enter the lengths of sides and angles...

    2. Write a program that prompts a user to enter the lengths of sides and angles for the two triangles described below. The program should calculate the length of the side of the triangle indicated below. Print the two answers to 3 decimal places onto the console screen Triangle 1 Read in the value of the angle, alpha, and the length, a, of the side indicated in the picture below. Calculate the length of the hypotenuse, c, of this right...

  • Please help c++ Heron's Formula for the area of a triangle with sides a, b and...

    Please help c++ Heron's Formula for the area of a triangle with sides a, b and c is given by the formula: area = S(S-a) (S-b) (S-c) where s = (a+b+c)/2 Write a complete program which in main asks the user for the sides a, b and c of a triangle. Use variables of type double. Pass a, b and c to a function called area. In area calculate s defining s as a local variable. Then use s, a,...

  • Geometric calclator use python to do this program. Write a program that displays the following menu:...

    Geometric calclator use python to do this program. Write a program that displays the following menu: 1. Calculate the area of circle 2. calculate the area of rectangle 3. calculate the area of triangle 4. Quit Enter your choice (1-4). if the user enters 1, your program should ask for the radius of the circle and then display its area. Use the formula to calculate the circle's area: Area = pi*r^2 Use 3.14149 for Pi and the radius of the...

  • O-a22 points STig2 3.3055 Find the area of a triangle with sides of length 13 and...

    O-a22 points STig2 3.3055 Find the area of a triangle with sides of length 13 and 29 and included angle 20, (Round your answer to one decimal place.) Need Help? vaach Bad it te to a Tutor O-022 points STig2 3.3008 29 An isosceles triangle has an area of 33 cm, and the angle between the two equal sides is Sm/6. What is the length of the two equal sides? (Round your answer to one decimal place.) cm Need Help?...

  • Java only please Write a program that displays the following menu: Geometry Calculator 1.       Calculate the...

    Java only please Write a program that displays the following menu: Geometry Calculator 1.       Calculate the Area of a Circle 2.       Calculate the Area of a Triangle 3.     Calculate the Area of a Rectangle 4.       Quit Enter your choice (1-4): If the user enters 1, the program should ask for the radius of the circle and then display its area. Use the formula:      area = ∏r2    Use 3.14159 for ∏. If the user enters 2 the program should ask for...

  • Write a C++ program to analyze a variety of triangles. The program should determine all angles...

    Write a C++ program to analyze a variety of triangles. The program should determine all angles and all sides for a triangle for three different options (give the user a menu of choices): 1) Given two sides and the angle between 2) Given two angles and one side 3) Given three sides More details for each option is provided below. Option 1: Given two sides and the angle between First check to be sure that the three values entered are...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT