Aller au contenu

Mathc initiation/a442

Un livre de Wikilivres.


Sommaire


Installer et compiler ces fichiers dans votre répertoire de travail.


c0b1.c
/* --------------------------------- */
/* save as c0b1.c                    */
/* --------------------------------- */
#include   "x_afile.h"
#include        "fb.h"
/* --------------------------------- */
int main(void)
{
double  Ix =  simpson_dzdydx( yzR, uz,vz,LOOP, sy,ty,LOOP, ax,bx,LOOP);
double  Iy =  simpson_dzdydx( xzR, uz,vz,LOOP, sy,ty,LOOP, ax,bx,LOOP);
double  Iz =  simpson_dzdydx( xyR, 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 Moments of inertia of the solid are :\n\n\n");
 printf("         (%+.1f  (%s     (%s    \n",   bx, teq, veq);
 printf(" Ix = int(   int(    int(  %s  dz dy dx = %.2f\n",yzReq,Ix);
 printf("         (%+.1f  (%s     (%s\n\n\n", ax, seq, ueq);

 printf("         (%+.1f  (%s     (%s    \n",   bx, teq, veq);
 printf(" Iy = int(   int(    int(  %s  dz dy dx = %.2f\n",xzReq,Iy);
 printf("         (%+.1f  (%s     (%s\n\n\n", ax, seq, ueq);

 printf("         (%+.1f  (%s     (%s    \n",   bx, teq, veq);
 printf(" Iz = int(   int(    int(  %s  dz dy dx = %.2f\n",xyReq,Iz);
 printf("         (%+.1f  (%s     (%s\n\n\n", ax, seq, ueq);
 stop();

 return 0;
}
/* --------------------------------- */
/* --------------------------------- */


Exemple de sortie écran :

 The Moments of inertia of the solid are :


         (+3.0  (+3     ((+cos(x)*sin(y) + 4)    
 Ix = int(   int(    int(  (y**2 + z**2) * (x* y**2 *z)  dz dy dx = 3814.97
         (-0.0  (-0     (0


         (+3.0  (+3     ((+cos(x)*sin(y) + 4)    
 Iy = int(   int(    int(  (x**2 + z**2) * (x* y**2 *z)  dz dy dx = 3382.72
         (-0.0  (-0     (0


         (+3.0  (+3     ((+cos(x)*sin(y) + 4)    
 Iz = int(   int(    int(  (x**2 + y**2) * (x* y**2 *z)  dz dy dx = 2775.07
         (-0.0  (-0     (0


 Press return to continue.