.
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main(void) {
|
||||
double capital;
|
||||
int annee;
|
||||
|
||||
do {
|
||||
printf("Montant a investir (entre 1000 et 50000) : ");
|
||||
scanf("%lf", &capital);
|
||||
} while (capital < 1000.0 || capital > 50000.0);
|
||||
|
||||
for (annee = 1; annee <= 7; annee++) {
|
||||
capital = capital * 1.04;
|
||||
printf("Annee %d : %.2f €\n", annee, capital);
|
||||
}
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
Reference in New Issue
Block a user