Aller au contenu

Mathc initiation/Fichiers h : c54fb

Un livre de Wikilivres.


Sommaire


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

c00f.c
/* --------------------------------- */
/* save as c00f.c                    */
/* --------------------------------- */
#include     "x_a.h"
#include      "ff.h"
/* --------------------------------- */
int main(void)
{
double n = 4;

 clrscrn();
 
 printf("     (n+1)! - n! = [(n+1)  n!] - n!   \n" 
        "                 = [(n+1) - 1]   n!   \n" 
        "                 =        n      n! \n\n"
        
        "    With  n      = %.0f   \n\n" 
        "  (n+1)! - n!    = %.0f     \n"
        " [(n+1)  - 1] n! = %.0f     \n"
        "         n    n! = %.0f \n\n\n",
                    n ,
           F_mns1a(n),
           F_mns1b(n),
           F_mns1c(n) );
 stop();
 
 return 0;
}
/* --------------------------------- */
/* --------------------------------- */


Exemple de sortie écran :
     (n+1)! - n! = [(n+1)  n!] - n!   
                 = [(n+1) - 1]   n!   
                 =        n      n! 

    With  n      = 4   

  (n+1)! - n!    = 96     
 [(n+1)  - 1] n! = 96     
         n    n! = 96 


 Press return to continue.