0% found this document useful (0 votes)
14 views2 pages

Assignment: Calculate Area of Triangulation

This C++ program calculates the area of a triangle given two sides (a and b) and the angle between them (in degrees, minutes, seconds) by taking half the product of the two sides and the sine of the angle in radians. The user is prompted to repeatedly enter the two sides and angle to calculate the area each time or quit by entering anything other than Y or y.

Uploaded by

fna93
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views2 pages

Assignment: Calculate Area of Triangulation

This C++ program calculates the area of a triangle given two sides (a and b) and the angle between them (in degrees, minutes, seconds) by taking half the product of the two sides and the sine of the angle in radians. The user is prompted to repeatedly enter the two sides and angle to calculate the area each time or quit by entering anything other than Y or y.

Uploaded by

fna93
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Assignment : Calculate area of triangulation

#Include <iostream.h>
#Include <math.h>
#Include <conio.h>
main ()
{
double area, a, b, angle, brg, deg, min, sec;
char ch;
top :
cout << \n Enter a? ;
cin >> a;
cout << \n Enter b? ;
cin >> b;
cout << \n Enter angle? ;
cin >> deg >> min >> sec;
brg : deg + min/60.0 + sec/3600.0
area : .0 * a * b * sin (brg * pi/180);
cout << \n Your area = << area;
cout << \n Do you like to try again [Y/N];
cin >> ch;
if (ch == y || ch == Y) goto top;
return 0;
}

You might also like