top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

C Program to Calculate Area of Scalene Triangle?

+2 votes
499 views
C Program to Calculate Area of Scalene Triangle?
posted Dec 2, 2014 by Balu

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button
What is Scalene Triangle?

1 Answer

+2 votes
 
Best answer
#include<stdio.h>
#include<math.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);
}

Output :

Enter Side1 : 3
Enter Side2 : 4
Enter included angle : 30
Area of Scalene Triangle : 3.000000
answer Dec 2, 2014 by Shivaranjini
...