Mathc initiation/a28
Installer ce fichier dans votre répertoire de travail.
fc.h |
---|
/* ---------------------------------- */
/* save as fc.h */
/* ---------------------------------- */
double f(
double x)
{
return(sin(x)+2.);
}
char feq[] = "sin(x)+2.";
/* ---------------------------------- */
double g(
double x)
{
return(cos(x)+2.);
}
char geq[] = "cos(x)+2.";
/* ---------------------------------- */
double h(
double x)
{
return(x);
}
char heq[] = "x";
/* ---------------------------------- */
double VCylindricalShell(
double x)
{
/*
Volume of a cylindrical shell = 2Pi(average radius)(altitude)(thickness)
*/
return( 2 * PI * h(x) * ( (f(x)) - (g(x)) ) );
}
/* ---------------------------------- */
/* ---------------------------------- */