DEV/DEV1.1/TP02/interets.c

30 lines
772 B
C
Raw Normal View History

2022-09-14 18:00:01 +02:00
#include <stdio.h>
#include <stdlib.h>
int main(void){
double n=0;
int annee=1;
printf("saisir la somme a investir: ");
scanf("lf",&n);
n= n + (n*0.04);
printf("somme au bout de %d annee(s): %9.4f \n", annee, n);
annee+=1;
n= n + (n*0.04);
printf("somme au bout de %d annee(s): %9.4f \n", annee, n);
annee+=1;
n= n + (n*0.04);
printf("somme au bout de %d annee(s): %9.4f \n", annee, n);
annee+=1;
n= n + (n*0.04);
printf("somme au bout de %d annee(s): %9.4f \n", annee, n);
annee+=1;
n= n + (n*0.04);
printf("somme au bout de %d annee(s): %9.4f \n", annee, n);
annee+=1;
n= n + (n*0.04);
printf("somme au bout de %d annee(s): %9.4f \n", annee, n);
annee+=1;
n= n + (n*0.04);
printf("somme au bout de %d annee(s): %9.4f \n", annee, n);
annee+=1;
}