Blob Blame Raw
#include <stdio.h>
#include <math.h>

int main() {
  float a = 10.f, b = 15.f, c = 20.f;
  float result;

  result = (1.f/4.f)*sqrtf((a+b+c)*(b+c-a)*(a+c-b)*(a+b-c));
  printf( "Area of triangle with sides %f, %f and %f is %f\n",
          a, b, c, result );

  result = (1.f/3.f)*M_PI*a*(b*b);
  printf( "Volume of cone with height %f and radius %f is %f\n",
          a, b, result );

  result = (4.f/3.f)*M_PI*a*b*c;
  printf( "Volume of ellipsoid with radiuses %f, %f and %f is %f\n",
          a, b, c, result );

  return 0;
}