Mathc initiation/a439
Installer et compiler ces fichiers dans votre répertoire de travail.
c0a5.c |
---|
/* --------------------------------- */
/* save as c0a5.c */
/* --------------------------------- */
#include "x_afile.h"
#include "fa.h"
/* --------------------------------- */
int main(void)
{
double Mass = simpson_dzdydx(R, uz,vz,LOOP, sy,ty,LOOP, ax,bx,LOOP);
double Mxy = simpson_dzdydx( zR, uz,vz,LOOP, sy,ty,LOOP, ax,bx,LOOP);
double Mzx = simpson_dzdydx( yR, uz,vz,LOOP, sy,ty,LOOP, ax,bx,LOOP);
double Mzy = simpson_dzdydx( xR, uz,vz,LOOP, sy,ty,LOOP, ax,bx,LOOP);
clrscrn();
printf(" The function of density is :\n\n"
" R : x,y,z -> %s\n\n", Req);
printf(" The volume is :\n\n");
printf(" v : x,y -> %s \n", veq);
printf(" u : x,y -> %s\n\n", ueq);
printf(" t : x -> %s \n", teq);
printf(" s : x -> %s\n\n", seq);
printf(" b : -> %s \n", bxeq);
printf(" a : -> %s\n\n", axeq);
stop();
clrscrn();
printf(" The center of mass is (X,Y)\n\n");
printf(" X = Mzy/Mass = %.2f\n"
" Y = Mzx/Mass = %.2f\n"
" Z = Mxy/Mass = %.2f\n\n\n",
Mzy/Mass, Mzx/Mass, Mxy/Mass);
stop();
return 0;
}
/* --------------------------------- */
/* --------------------------------- */
Exemple de sortie écran :
The center of mass is (X,Y)
X = Mzy/Mass = 1.86
Y = Mzx/Mass = 2.27
Z = Mxy/Mass = 2.58
Press return to continue.