Aller au contenu

Mathc initiation/004u

Un livre de Wikilivres.


Sommaire

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

c0c1.c
/* --------------------------------- */
/* save as c0c1.c                    */
/* --------------------------------- */
#include   "x_afile.h"
#include        "fc.h"
/* --------------------------------- */
int main(void)
{
double  Ix =  simpson_dzdydx( yzR, z0,z1,LOOP, y0,y1,LOOP, x0,x1,LOOP);
double  Iy =  simpson_dzdydx( xzR, z0,z1,LOOP, y0,y1,LOOP, x0,x1,LOOP);
double  Iz =  simpson_dzdydx( xyR, z0,z1,LOOP, y0,y1,LOOP, x0,x1,LOOP);
 
 clrscrn();
 printf(" The function of density is :\n\n"
        " R : x,y,z -> %s\n\n", Req);

 printf(" f  : x,y,z -> %s\n\n",  feq);
 printf(" z1 : x,y   -> %s  \n", z1eq);
 printf(" z0 : x,y   -> %s\n\n", z0eq);
  
 printf(" y1 : x     -> %s  \n", y1eq);
 printf(" y0 : x     -> %s\n\n", y0eq);

 printf(" x1 :       -> %s  \n", x1eq); 
 printf(" x0 :       -> %s\n\n", x0eq);
 stop();

 clrscrn();
 
 printf(" The Moments of inertia of the solid are :\n\n\n");
 printf("         (%+.1f  (%s     (%s    \n",   x1, y1eq, z1eq);
 printf(" Ix = int(   int(    int(  %s  dz dy dx = %.2f\n",yzReq,Ix);
 printf("         (%+.1f  (%s     (%s\n\n\n", x0, y0eq, z0eq);

 printf("         (%+.1f  (%s     (%s    \n",   x1, y1eq, z1eq);
 printf(" Iy = int(   int(    int(  %s  dz dy dx = %.2f\n",xzReq,Iy);
 printf("         (%+.1f  (%s     (%s\n\n\n", x0, y0eq, z0eq);

 printf("         (%+.1f  (%s     (%s    \n",   x1, y1eq, z1eq);
 printf(" Iz = int(   int(    int(  %s  dz dy dx = %.2f\n",xyReq,Iz);
 printf("         (%+.1f  (%s     (%s\n\n\n", x0, y0eq, z0eq);
 stop();

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

Exemple de sortie écran :

 The function of density is :

 R : x,y,z -> (x * y**2)

 f  : x,y,z -> 1

 z1 : x,y   -> (+cos(x)*sin(y) + 4)  
 z0 : x,y   -> (+cos(x)*sin(y) - 4)

 y1 : x     -> +3  
 y0 : x     -> -0

 x1 :       -> +3  
 x0 :       -> -0

 Press return to continue. 


 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)  dz dy dx = 3548.82
         (-0.0  (-0     ((+cos(x)*sin(y) - 4)


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


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


 Press return to continue.