Developpement/23DEV1.1/TPS1/TP01/05-Reels/Interet.c

28 lines
648 B
C
Raw Permalink Normal View History

2024-12-09 11:53:11 +01:00
#include <stdio.h>
#include <stdlib.h>
int main(void) {
double f;
double r;
printf("Combien d'euros voulez-vous investir ? ");
scanf("%lf", &f);
r = f;
printf("Annee 0 : %9.2f\n", f);
f = f * 1.04;
printf("Annee 1 : %9.2f\n", f);
f = f * 1.04;
printf("Annee 2 : %9.2f\n", f);
f = f * 1.04;
printf("Annee 3 : %9.2f\n", f);
f = f * 1.04;
printf("Annee 4 : %9.2f\n", f);
f = f * 1.04;
printf("Annee 5 : %9.2f\n", f);
f = f * 1.04;
printf("Annee 6 : %9.2f\n", f);
f = f * 1.04;
printf("Annee 7 : %9.2f\n", f);
printf("Votre épargne sera de : %9.2f\n", f);
printf("Le bénéfice sera de : %9.2f\n", f-r);
return EXIT_SUCCESS;
}