// Exercice 8 TD 1
// Créateur JCM
// Calcul de la détente des rugbyman
#include <stdio.h>
#include <math.h>
int main(void)
{
	float droumat,djohnson,perte,dfroumat,dfjohnson,hroumat,hjohnson;
	int nb_touche;
	droumat=80;
	djohnson=85;
	nb_touche=18;
	perte=0.01;
	dfroumat=droumat*pow((1-perte),(nb_touche-1));
	dfjohnson=djohnson*pow((1-perte),(nb_touche-1));
	hroumat=droumat*(-1+(1- pow((1-perte),nb_touche)) / (1-(1-perte)));
	hjohnson=djohnson*(-1+(1- pow((1-perte),nb_touche)) / (1-(1-perte)));
	//clearscreen;
	printf("A la 18 ème touche, Roumat aura une détente de %.2f cm.\n",dfroumat);
	printf("A la 18 ème touche, Johnson aura une détente de %.2f cm.\n",dfjohnson);
	printf("La hauteur totale sauté par le joueur Roumat est de %.2f cm.\n",hroumat);
	printf("La hauteur totale sauté par le joueur Johnson est de %.2f cm.\n",hjohnson);
	return(0);
}
