/*
* TP1 : initiation au langage C
*
* Exercice 3 - 24/09/02
*
* ©2002 All Rights Reserved to www.Software-DS.com
*/
#include <stdio.h>
#define n 4
int main(void)
{
int i,fact=1;
float x=2,xpuiss=1,somme=0;
for(i=1;i<=n;i++){
xpuiss*=x;
fact*=i;
somme+=xpuiss/fact;
}
printf("resultat %f\n",somme);
return 0;
/* ©2002 All Rights Reserved to http://www.Software-DS.com
*/
}
|