/* Computing the area of a triangle */

#include<stdio.h>

/* Need the math library to use the sqrt function */
#include<math.h>

int main(void) {
  float side1, side2, side3;
  float s;
  char ch1[50],ch2[50],ch3[50];
  float area;

  printf("Type three words\n");
  scanf("%s %s %s",ch1,ch2,ch3);
  printf("%s %s %s\n",ch1,ch2,ch3); 


  printf("Enter the three sides of a triangle: ");
  scanf("%f%f%f", &side1, &side2, &side3 );

  s = ( side1 + side2 + side3 ) / 2;

  area = sqrt( s*(s-side1)*(s-side2)*(s-side3));

  printf("The area of the triangle is: %4.2f\n", area);

  return 0;

}
