C Program To Find Area Of Scalene Triangle

C Program To Find Area Of Scalene Triangle

#include<stdio.h>
#include<math.h>

int main()
 {
 
   int s1, s2, angle;
   float area;

   printf("Enter Side1 :\n ");
   scanf("%d", &s1);   //input from user

   printf("Enter Side2 :\n ");
   scanf("%d", &s2);   //input from user

   printf("Enter included angle :\n ");
   scanf("%d", &angle);    //input from user

   area = (s1 * s2 * sin((M_PI / 180) * angle)) / 2;   //Calculation of Area

   printf("Area of Scalene Triangle is : %f\n", area);   //Print Area On Output Screen

}

Related Posts