In this post, we have shared a c program to find area of scalene triangle example with the output.
A scalene triangle is a triangle in which all three sides have different lengths. Also the angles of a scalene triangle have different measures. Some right triangles can be a scalene triangle when the other two angles or the legs are not congruent. Below is the diagram of scalene triangle.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | #include<stdio.h> int main() { int s1,s2,angle; float area; printf("nEnter Side1 : "); scanf("%d",&s1); printf("nEnter Side2 : "); scanf("%d",&s2); printf("nEnter included angle : "); scanf("%d",&angle); area = (s1 * s2 * sin((M_PI/180)*angle))/2; printf("nArea of Scalene Triangle : %f",area); return(0); } |
Program Output
Enter Side1 : 3
Enter Side2 : 4
Enter included angle : 30
Area of Scalene Triangle : 3.000000
If you like FreeWebMentor and you would like to contribute, you can write an article and mail your article to [email protected] Your article will appear on the FreeWebMentor main page and help other developers.