Code:
#include <stdio.h>
#include <math.h>
int main() {
// Declare variables to store user input
double a, b, c;
printf("Enter the length of side a: ");
scanf("%lf", &a);
printf("Enter the length of side b: ");
scanf("%lf", &b);
printf("Enter the length of side c: ");
scanf("%lf", &c);
double s = (a + b + c) / 2;
double area = sqrt(s * (s - a) * (s - b) * (s - c));
printf("Area of the triangle: %lf\n", area);
return 0;
}