Aller au contenu

Mathc initiation/a240

Un livre de Wikilivres.


Sommaire


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

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

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


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

    With  n  = 4   

 (n+1)! + n! = 144     
 (n+2)    n! = 144 


 Press return to continue.