28 lines
648 B
C
28 lines
648 B
C
|
#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;
|
||
|
}
|